Image reading apparatus, image reading system, image reading method, and non-transitory computer-readable storage medium storing program

ABSTRACT

A control portion performs a predetermined detection process on a first image from a first reading portion and a second image from a second reading portion. When the detection process on the each image is successful, the control portion performs, based on a value of an image processing variable specified from a detection result, predetermined image processing on the each image, When the detection process on the image of one side fails, a value of an image processing variable for the image of one side is specified based on a value of an image processing variable specified from the detection result for the image of the other side for which detection is successful. Based on the specified value of the image processing variable, image processing is performed on the image of one side.

The present application is based on, and claims priority from JPApplication Serial Number 2020-060395, filed Mar. 30, 2020, thedisclosure of which is hereby incorporated by reference herein in itsentirety.

BACKGROUND 1. Technical Field

The present disclosure relates to an image reading apparatus, an imagereading system, an image reading method, and a non-transitorycomputer-readable storage medium storing a program for reading anoriginal document to acquire an image.

2. Related Art

For example, JP-A-2018-139371 discloses an image reading apparatusincluding a reading portion reading an original document. Such an imagereading apparatus performs a tilt correction process of correcting atilt of a read image. In the tilt correction process, a tilt angle of anoriginal document region in the read image is detected, and the originaldocument region is rotated by the tilt angle in a direction ofeliminating the tilt of the original document region. The image readingapparatus performs a cutout process of cutting out the original documentregion in the read image. The image reading apparatus may perform arotation process of rotating an original document region in apredetermined orientation in order to align an orientation of theoriginal document region. There is an image reading apparatus that canread both sides such as a front side and a rear side of an originaldocument.

However, in the image reading apparatus disclosed in JP-A-2018-139371,the original document region in the read image may not detectable.Examples of cases in which the read image is not detectable include acase where the boundary line is erroneously detected because a boundaryline between the original document region and a background region in theread image is unclear or because of wrinkles of an original document. Inthat case, since a tilt angle of the original document region cannot bedetected, predetermined image processing such as a tilt correctionprocess of correcting a tilt of the original document region or a cutoutprocess of cutting out the original document region cannot be performedor is inappropriately performed. Therefore, an inappropriate image notsubjected to the appropriate predetermined image processing is output.Thus, there is a problem in that the frequency of obtaining an image ofan original document subjected to appropriate image processing isreduced. Therefore, it is desirable to reduce the frequency ofoutputting an inappropriate image of an original document. Inparticular, in an image reading apparatus that reads both sides of anoriginal document, an image of one side of the images obtained byreading both sides of the original document may be subjected toappropriate image processing, but an image of the other side may not besubjected to appropriate image processing. Therefore, it is desirable toreduce the frequency of outputting an inappropriate image of an originaldocument.

SUMMARY

According to an aspect of the present disclosure, there is provided animage reading apparatus that reads an original document to acquire animage, the image reading apparatus including a first reading portionthat reads a first side of the original document to acquire a firstimage; a second reading portion that reads a second side that is anopposite side to the first side of the original document to acquire asecond image; and a control portion that performs a predetermineddetection process on the first image and performs the predetermineddetection process on the second image, in which, when the predetermineddetection process is successful for the first image, the control portionperforms, based on a value of an image processing variable specifiedfrom a detection result of the predetermined detection process,predetermined image processing on the first image, when thepredetermined detection process is successful for the second image, thecontrol portion performs, based on a value of an image processingvariable specified from a detection result of the predetermineddetection process, the predetermined image processing on the secondimage, and, when the predetermined detection process on an image of oneside of the first side and the second side fails, the control portionspecifies, based on a value of an image processing variable specifiedfrom a detection result of the predetermined detection process on animage of the other side for which the predetermined detection process issuccessful among the first side and the second side, a value of an imageprocessing variable for the image of the one side, and performs, basedon the specified value of the image processing variable, thepredetermined image processing on the image of the one side.

According to another aspect of the present disclosure, there is providedan image reading method of reading an original document to acquire animage, the image reading method including reading a first side and asecond side of the original document, performing a predetermineddetection process on a first image obtained by reading the first side ofthe original document and performing the predetermined detection processon a second image obtained by reading the second side that is anopposite side to the first side of the original document, and when thepredetermined detection process is successful for the first image,performing, based on a value of an image processing variable specifiedfrom a detection result of the predetermined detection process,predetermined image processing on the first image, when thepredetermined detection process is successful for the second image,performing, based on a value of an image processing variable specifiedfrom a detection result of the predetermined detection process, thepredetermined image processing on the second image, and, when thepredetermined detection process on an image of one side of the firstside and the second side fails, specifying, based on a value of an imageprocessing variable specified from a detection result of thepredetermined detection process on an image of the other side for whichthe predetermined detection process is successful among the first sideand the second side, a value of an image processing variable for theimage of the one side, and performing, based on the specified value ofthe image processing variable, the predetermined image processing on theimage of the one side.

According to still another aspect of the present disclosure, there isprovided a non-transitory computer-readable storage medium storing aprogram executed by a computer that performs a process of reading anoriginal document to acquire an image, the program causing the computerto execute performing a predetermined detection process on a first imageobtained by reading a first side of the original document and performingthe predetermined detection process on a second image obtained byreading a second side that is an opposite side to the first side of theoriginal document, and when the predetermined detection process issuccessful for the first image, performing, based on a value of an imageprocessing variable specified from a detection result of thepredetermined detection process, predetermined image processing on thefirst image, when the predetermined detection process is successful forthe second image, performing, based on a value of an image processingvariable specified from a detection result of the predetermineddetection process, the predetermined image processing on the secondimage, and, when the predetermined detection process on an image of oneside of the first side and the second side fails, specifying, based on avalue of an image processing variable specified from a detection resultof the predetermined detection process on an image of the other side forwhich the predetermined detection process is successful among the firstside and the second side, a value of an image processing variable forthe image of the one side, and performing, based on the specified valueof the image processing variable, the predetermined image processing onthe image of the one side.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a perspective view illustrating an image reading apparatusaccording to a first embodiment.

FIG. 2 is a schematic side sectional view illustrating the image readingapparatus.

FIG. 3 is a block diagram illustrating an electric configuration of animage reading system.

FIG. 4 is a schematic diagram illustrating read data of a front side andread data of a rear side of an original document.

FIG. 5 is a schematic diagram illustrating a relationship betweenoriginal document regions of the front side and the rear side in theread data.

FIG. 6 is a schematic diagram for explaining a tilt correction processfor an original document region.

FIG. 7 is a schematic diagram illustrating image data of an originaldocument generated through a cutout process.

FIG. 8 is a schematic diagram illustrating image data of a front side ofa horizontally bound original document.

FIG. 9 is a schematic diagram illustrating image data of a rear side ofthe horizontally bound original document.

FIG. 10 is a schematic diagram illustrating image data of a front sideof an upper bound original document.

FIG. 11 is a schematic diagram illustrating image data of a rear side ofthe upper bound original document.

FIG. 12 is a schematic diagram illustrating a front side and a rear sideof a horizontally bound original document.

FIG. 13 is a schematic diagram illustrating a set orientation and imagedata of the front side and the rear side of the horizontally boundoriginal document.

FIG. 14 is a schematic diagram illustrating a set orientation and imagedata of the front side and the rear side of the horizontally boundoriginal document.

FIG. 15 is a schematic diagram illustrating a set orientation and imagedata of the front side and the rear side of the horizontally boundoriginal document.

FIG. 16 is a schematic diagram illustrating a set orientation and imagedata of the front side and the rear side of the horizontally boundoriginal document.

FIG. 17 is a schematic diagram illustrating a front side and a rear sideof an upper bound original document.

FIG. 18 is a schematic diagram illustrating a set orientation and imagedata of the front side and the rear side of the upper bound originaldocument.

FIG. 19 is a schematic diagram illustrating a set orientation and imagedata of the front side and the rear side of the upper bound originaldocument.

FIG. 20 is a schematic diagram illustrating a set orientation and imagedata of the front side and the rear side of the upper bound originaldocument.

FIG. 21 is a schematic diagram illustrating a set orientation and imagedata of the front side and the rear side of the upper bound originaldocument.

FIG. 22 is a flowchart illustrating a first image processing routine.

FIG. 23 is a flowchart illustrating a second image processing routine.

FIG. 24 is a flowchart illustrating a horizontal binding rotationprocess routine.

FIG. 25 is a flowchart illustrating an upper binding rotation processroutine.

FIG. 26 is a block diagram illustrating an electric configuration of animage reading system according to a second embodiment.

FIG. 27 is a block diagram illustrating an electric configuration of animage reading system according to a third embodiment.

DESCRIPTION OF EXEMPLARY EMBODIMENTS First Embodiment

Hereinafter, a first embodiment of an image reading apparatus will bedescribed with reference to the drawings.

As illustrated in FIG. 1, an image reading apparatus 11 of the presentembodiment includes a main body 12 having a substantially trapezoidalshape in a side view, and an original document support 13 on which anoriginal document 14 that is an image reading target is mount (set). Astacker 15 is stored in the main body 12 under a discharge port 12B soas to be slidable in a front-rear direction.

The original document support 13 has a planar platen 13A on which aplurality of original documents 14 are mountable by extending obliquelyupward to the rear side of the main body 12. The original documentsupport 13 is provided with a pair of edge guides 13B that are slidablein a width direction X that intersects (particularly orthogonal to) atransport direction Y1 in which the original document 14 is transported.The original document 14 loaded on the platen 13A is sandwiched betweenthe pair of edge guides 13B to be positioned in the width direction Xwith respect to a feed port 12A. The platen 13A of the original documentsupport 13 is provided with a slide-type auxiliary support portion 13Cto be movable in and out. The original document 14 loaded on the platen13A is brought into contact with the slide-type auxiliary supportportion 13C to be positioned in the transport direction Y1 with respectto the feed port 12A. The width direction X is a main scanning directionwhen the image reading apparatus 11 reads the original document 14, anda direction opposite to the transport direction Y1 is the sub-scanningdirection Y. Hereinafter, the width direction X will also be referred toas a main scanning direction X.

The original documents 14 mounted on the original document support 13are fed one by one from the feed port 12A opened at the upper part ofthe main body 12 into the main body 12. The fed original document 14 istransported in the main body 12 along a predetermined transport path 29(refer to FIG. 2), and, an image thereof is read in a reading region SAduring the transport, and the original document 14 is discharged fromthe discharge port 12B that is opened on a lower front side of the mainbody 12.

A power button 20 is provided on a front surface portion 12C of the mainbody 12. The front surface portion 12C of the main body 12 is providedwith a display portion 22 such as a liquid crystal panel displaying apredetermined image in a display region 23. Menus, selection items, orinformation such as an operation status of the image reading apparatus11 are displayed on the display portion 22. The display portion 22 isprovided with an operation portion 21 such as a touch panel that detectsa user's touch operation. The operation portion 21 is configured toinput necessary information according to the user's touch operation whenan instruction is given to the image reading apparatus 11.

As illustrated in FIG. 2, the main body 12 includes a main body portion18 and a cover portion 19 rotatably coupled around a front end portionof the main body portion 18. The main body 12 has the transport path 29(transport passage) extending from the feed port 12A to the dischargeport 12B between the main body 18 and the cover portion 19.

A transport mechanism 30 transporting the original document 14 isprovided in the main body 12. The transport mechanism 30 includes a feedportion 30A that feeds the original documents 14 loaded (set) on theoriginal document support 13 one by one while guiding the originaldocuments 14 to the main body 12, a transport portion 31 that transportsthe fed original documents 14 along the transport path 29 to passthrough the reading region SA, and a discharge portion 32 thatdischarges the original document 14 after an image is read during thetransport using the transport portion 31. The transport mechanism 30 hasan automatic document feed function of sequentially transporting aplurality of original documents 14 loaded on the original documentsupport 13 one by one along the transport path 29 to pass through thereading region SA.

The feed portion 30A is provided with a single feed roller 33 (pickuproller) facing a feed guide 30B at an upstream end position of thetransport path 29 in the main body 12. The feed portion 30A feeds aplurality of original documents 14 loaded on the original documentsupport 13 one by one from the feed port 12A along the feed guide 30B.

The transport portion 31 includes a feed roller pair 34 arranged at aposition downstream of the feed roller 33 in the transport direction Y1and a transport roller pair 35 arranged at a position upstream of thereading region SA in the transport direction Y1. The feed roller pair 34includes a driving roller 34A and a separation roller 34B (retardroller). The transport roller pair 35 includes a driving roller 35A anda driven roller 35B.

The discharge portion 32 includes a discharge roller pair 36 arranged ata position downstream of the reading region SA in the transportdirection Y1. The discharge roller pair 36 includes a driving roller 36Aand a driven roller 36B. The discharge roller pair 36 transports theoriginal document 14 that is being read along with the transport rollerpair 35.

As described above, the feed roller 33, the feed roller pair 34, thetransport roller pair 35, and the discharge roller pair 36 are disposedin this order from the upstream in the transport direction Y1, and thepair thereof are arranged with a gap in the width direction X.

The plurality of rollers 33 and 34A of the feed system are rotationallydriven by power of a feed motor 37 that is a power source for therollers. The plurality of original documents 14 loaded on the originaldocument support 13 are fed from the feed port 12A into the main body 12in order from the lowest one by the feed roller 33. In theabove-described way, the feed portion 30A (the rollers 33 and 34A andthe like) is driven by the feed motor 37 as a power source.

The separation roller 34B of the feed system and the driving rollers 35Aand 36A of the transport system are rotationally driven by the power ofa transport motor 38 that is a power source thereof. The originaldocument 14 fed into the main body 12 by the feed roller 33 istransported to the reading region SA and is then discharged from thedischarge port 12B. In the above-described way, the transport portion 31(the transport roller pair 34 and the like) and the discharge portion 32(the discharge roller pair 36 and the like) are driven using thetransport motor 38 as a common power source.

The driving rollers 35A and 36A are rotationally driven to transport theoriginal document 14 at the same transport speed (reading speed) whenthe original document 14 is read. The driven rollers 35B and 36B arerotated due to rotation of the driving rollers 35A and 36A which arerespectively paired therewith.

An encoder 44 (for example, a rotary encoder) detecting rotation of onedriving roller of the transport system among the plurality of rollerpairs 34 to 36 is provided in the main body 12. The encoder 44 outputs adetection signal including the number of pulses proportional to anamount of rotation of the driving roller to a control portion 50(controller). Therefore, the control portion 50 can recognize a position(transport position) and a transport speed of the original document 14that is being transported based on the detection signal from the encoder44.

An original document sensor 45 that detects the presence of the originaldocument 14 set on the original document support 13 is disposed betweenthe feed guide 30B and the feed roller 33. The original document sensor45 is, for example, a contact type sensor having a lever, and is turnedon when the original document 14 is set on the original document support13 and the set original document 14 pushes the lever.

An original document presence sensor 46 detecting the presence of theoriginal document 14 is disposed at a position slightly downstream ofthe nip of the transport roller pair 35 in the transport direction Y1.The original document presence sensor 46 is, for example, a contact typesensor having a lever (contactor). The original document presence sensor46 is turned on by detecting the original document 14 when a leading endof the original document 14 pushes the lever, and is turned off when atrailing end of the original document 14 passes and thus the lever isnot pushed such that the original document 14 is not detected.Therefore, the control portion 50 detects that the leading end of theoriginal document 14 has passed through the transport roller pair 35 andthe trailing end of the original document 14 has passed through thetransport roller pair 35 based on a detection signal (ON/OFF) from theoriginal document presence sensor 46. The detection result from theoriginal document presence sensor 46 detecting the leading end and thetrailing end of the original document 14 is used for control fordetermining start and end timings of a reading operation of readingportions 40 (40A and 40B) described later. The original documentpresence sensor 46 can detect the leading end and the trailing end ofthe original document 14, and may also detect a length of the originaldocument 14 in the transport direction Y1, that is, an original documentsize defined by the length, based on a transport distance of theoriginal document 14 from detection of the leading end of the originaldocument 14 to the detection of the trailing end thereof. The originaldocument presence sensor 46 may be a non-contact type sensor such as anoptical sensor.

The reading portions 40 reading the original document 14 is provided inthe main body 12 of the image reading apparatus 11. Each of a pair ofreading portions 40 is provided on each side of the transport path 29 ata position between the transport roller pair 35 and the discharge rollerpair 36 in the transport direction Y1. In the present embodiment, thepair of reading portions 40 include a first reading portion 40A thatreads a front side (lower side) of the original document 14 transportedalong the transport path 29, and a second reading portion 40B that readsa rear side (upper side) of the original document 14 transported alongthe transport path 29, and are disposed at positions slightly deviatedfrom each other in the transport direction Y1, but may be configured notto include one of the reading portions.

Each of the pair of reading portions 40 includes a light source 41irradiating the original document 14 that is being transported withlight by irradiating the reading region SA with the light, and an imagesensor 42 reading an image from the original document 14. In a normalreading mode, only the first reading portion 40A performs a readingoperation to read the front side of the original document 14, and, in adouble-sided reading mode, both the first reading portion 40A and thesecond reading portion 40B perform a reading operation to read bothsides (front and rear sides) of the original document 14.

The light source 41 includes, for example, an LED or a fluorescent lamp.The image sensor 42 receives reflected light that is light applied fromthe light source 41 and is reflected by the original document 14,converts the received light into an electric signal, and outputs a pixelsignal having a value corresponding to an amount of the received light.In the above-described way, the image sensor 42 is a sensor that readsan image. The image sensor 42 is, for example, a linear image sensor.The image reading apparatus 11 can perform color scanning and monochromescanning (grayscale scanning). In the following description, the lightsource 41 and the image sensor 42 of the first reading portion 40A sidewill be referred to as a first light source 41A and a first image sensor42A, and the light source 41 and the image sensor 42 of the secondreading portion 40B side will be referred to as a second light source41B and a second image sensor 42B in some cases.

The image sensor 42 is, for example, a contact type image sensor inwhich a plurality of photoelectric conversion elements are arranged in arow along the main scanning direction X. Specifically, the image sensor42 is a complementary metal oxide semiconductor (CMOS) image sensor. Theimage sensor 42 photoelectrically converts light received by eachphotoelectric conversion element and outputs a pixel signal having avalue corresponding to an amount of the received light.

For example, when double-sided reading is performed, the front side ofthe original document 14 is read by the first image sensor 42A, and therear side of the original document 14 is read by the second image sensor42B. When single-sided reading is performed, the front side of theoriginal document 14 is read by the first image sensor 42A. Each of theimage sensors 42A and 42B has a reading region wider than the maximumoriginal document size that can be read by the image reading apparatus11. That is, each of the image sensors 42A and 42B forming the readingportions 40 has a reading range slightly longer than a width of themaximum size original document 14 in the main scanning direction X.

A color reference plate 43 is disposed at a position facing the imagesensor 42 with the transport path 29 therebetween. The color referenceplate 43 is disposed in the main scanning direction X over a regionwider than the transport region of the original document 14 in a readingtarget range of the reading portion 40. Therefore, the color referenceplate 43 also functions as a background plate that is read as thebackground of the original document 14. The color reference plate 43 isdisposed over a range slightly wider than the width of the maximum sizeoriginal document 14 in the main scanning direction X. That is, thecolor reference plate 43 is disposed in a range including at least aregion facing the reading range of each of the image sensors 42A and 42Bin the scanning direction. Therefore, each of the image sensors 42A and42B reads the color reference plate 43 in a region where the originaldocument 14 is not present.

The color reference plate 43 is a member for obtaining a white referencevalue for shading correction, and a white reference plate exhibitingwhite or a gray reference plate exhibiting gray is used. As a result,the color reference plate 43 is read as a white reference image, and awhite reference value is generated based on the read white referenceimage. The gray reference plate is read as the background (graybackground) of the original document and is used for detecting aposition and a region of the original document 14. When a sensor fordetecting the original document region is separately provided, the colorreference plate 43 is preferably a white reference plate. The colorreference plate 43 is not limited to a plate shape, and may have anyshape and color as long as the color reference plate is a referencemember for obtaining a white reference value used as a reference forluminance.

The image reading apparatus 11 includes the control portion 50. Thecontrol portion 50 controls the image reading apparatus 11 when thecontrol portion 50 receives a job of reading an image from the originaldocument 14 based on an operation signal from the operation portion 21(refer to FIG. 1) operated by the user or a reading instruction signal(reading instruction) from a host apparatus 100 described later. Whenreading control is performed, the control portion 50 controls the feedmotor 37, the transport motor 38, and the reading portions 40A and 40B,and processes image data based on images read from the original document14 by the reading portions 40A and 40B.

Next, an electric configuration of the image reading apparatus 11 willbe described with reference to FIG. 3.

As illustrated in FIG. 3, the image reading apparatus 11 is coupled tothe host apparatus 100 through a communication cable. The host apparatus100 is, for example, a personal computer (hereinafter, also referred toas a “PC”), and includes an operation portion 101 and a display portion102 that are electrically coupled to a main body of the personalcomputer. The host apparatus 100 includes a scan driver (notillustrated) configured with software inside the host apparatus 100 byinstalling a scan driver program therein. The scan driver has a functionof instructing the image reading apparatus 11 to read the originaldocument 14. The scan driver transmits reading instruction information(scan job data) including reading condition information designated by auser operating the operation portion 101 of the host apparatus 100 andvarious commands, to the image reading apparatus 11. The scan driverreceives image data including an image of the original document 14 readfrom the image reading apparatus 11 in response to the readinginstruction information as a file with a format designated as one of thereading instruction information. The host apparatus 100 is not limitedto a PC, but may be a personal digital assistant (PDA), a tablet PC, asmart device such as a smartphone, or the like.

When the operation portion 21 or the operation portion 101 of the hostapparatus 100 is operated by the user, setting conditions related to animage reading process are set. That is, the setting conditions are setthrough the user's input operation. The setting conditions includereading conditions including an original document size, a readingresolution, a color mode, single-sided reading/double-sided reading, andstorage conditions including a read data (image data) storage format, aforwarding method, and a storage destination. The original document sizeincludes, for example, an A4 size and a B5 size, the reading resolutionincludes, for example, 300 dpi/600 dpi, and the color mode includesmonochrome (gray scale)/color. The storage format includes a PDF format,a PDF/A format, a JPEG format, a GIF format, a TIFF format, and thelike. The forwarding method includes forwarding to the host apparatus100 and e-mail forwarding, and an address of the storage destination isdesignated in the storage destination.

The image reading apparatus 11 has the built-in control portion 50 thatintegrally controls the above operation. The control portion 50 includesa computer 60 configured with a microprocessor or the like. The computer60 includes a storage section 61 (memory) configured with a RAM, anon-volatile memory, and the like. The storage section 61 stores aprogram PR or the like to be executed during reading control.

The control portion 50 is provided with an input section 62 including aninput interface inputting various data and signals from the hostapparatus 100 and an output section 63 including an output interfaceoutputting read data that is read by the image reading apparatus 11 tothe host apparatus 100.

The control portion 50 includes a timing generator 64 (hereinafter, alsoreferred to as a “TG 64”) that outputs pulse signals that define variousoperation timings including a read operation to the image sensors 42Aand 42B. The control portion 50 includes an analog front end 65(hereinafter, also referred to as an “AFE 65”) that performsanalog/digital conversion (A/D conversion) of pixel signals input fromthe image sensors 42A and 42B.

The storage section 61 stores the program PR including image processingroutines illustrated in flowcharts of FIGS. 22 to 25. The storagesection 61 stores setting condition information through the user's inputoperation on the operation portion 21. The computer 60 includes a maincontrol section 70, a transport control section 71, a reading controlsection 72, and an image processing section 73 as functionalconstituents configured with software internally configured by executingthe program PR. The main control section 70 integrally controls theimage reading apparatus 11.

The transport control section 71 controls driving of the feed motor 37and the transport motor 38 in response to instructions of the maincontrol section 70. The feed roller 33 is rotated by driving the feedmotor 37, and thus a plurality of original documents 14 set in theoriginal document support 13 are fed into the main body 12 one by one inorder from the lowest one. One driving roller 34A forming the feedroller pair 34 is rotationally driven by driving the feed motor 37, andthe other separation roller 34B is rotationally driven by driving thetransport motor 38. In particular, the transport control section 71controls driving of the feed motor 37 and the transport motor 38 suchthat the original document 14 is transported at a reading speedcorresponding to a reading resolution (for example, 300/600 dpi) in thereading region SA in the middle of the transport path 29. For example,when the reading resolution is relatively low (for example, 300 dpi),the original document 14 is transported at a high speed, and, when thereading resolution is relatively high (for example, 600 dpi), theoriginal document 14 is transported at a low speed.

The reading control section 72 controls the reading portion 40 via theTG 64, and causes the reading portion 40 to read an image of theoriginal document 14. In particular, the reading control section 72outputs pulse signals that defines operation timings of variousoperations including a reading operation on the image sensor 42, to theTG 64, and controls light emission of the light source 41 via a lightsource driving section (not illustrated) such that the reading region SAis irradiated with light from the light source 41.

When a digital signal corresponding to an image read by the readingportion 40 is input via the AFE 65, the image processing section 73temporarily stores image data based on the input digital signal, andperforms a well-known correction process such as shading correction onthe stored image data to generate image data of the original document14. The image processing section 73 performs various corrections such asgamma correction in addition to the shading correction to generatecorrected image data. In addition, the image processing section 73performs a format conversion process of converting image data into afile with a designated format. Examples of a designable format include aJPEG format, a PDF format, and a TIF format. The image processingsection 73 transmits the file generated through conversion into thedesignated format to a designated transmission destination via theoutput section 63. In the image reading apparatus 11, transmissiondestinations that is designable by the user include, for example, thehost apparatus 100 coupled thereto via a communication cable (notillustrated), a server apparatus (not illustrated) coupled thereto via anetwork such as the Internet, and a terminal apparatus designated by ane-mail address when the file is attached to an e-mail. The serverapparatus includes a cloud server apparatus.

The image processing section 73 of the present embodiment performs apredetermined detection process and predetermined image processing onread data during generation of the file with the designated format fromthe read data, and thus generates image data of the original documentbefore being converted into the designated format.

The image processing section 73 of the present embodiment performs thepredetermined detection process and the predetermined image processingon first read data SD1 obtained by the first reading portion 40A readinga front side P1 of the original document 14 and second read data SD2obtained by the second reading portion 40B reading a rear side P2 of theoriginal document 14 (refer to FIG. 4). The image processing section 73performs an edge detection process and a character detection process asthe predetermined detection process. The image processing section 73performs a tilt correction process, a cutout process, and a rotationprocess as the predetermined image processing. Hereinafter, the firstread data SD1 will also be referred to as read data SD1 of the frontside, and the second read data SD2 will also be referred to as read dataSD2 of the rear side.

As illustrated in FIG. 3, the image processing section 73 includes anedge detection processor 74, a tilt correction processor 75, a cutoutprocessor 76, and a rotation processor 77.

As illustrated in FIG. 4, the edge detection processor 74 performs anedge detection process of detecting an edge EG1 of an original documentregion DA1 that is a region of the original document in the read dataSD1 of the front side, and an edge EG2 of an original document regionDA2 that is a region of the original document in the read data SD2 ofthe rear side.

The edge detection processor 74 analyzes the RGB format read data SD1and SD2, and thus analyzes tilt angles at which the original documentregions DA1 and DA2 are tilted in the read data SD1 and SD2 read by theimage sensors 42A and 42B of the reading portions 40A and 40B. Inparticular, the edge detection processor 74 discriminates the originaldocument regions DA1 and DA2 from the background regions BA1 and BA2outside the original document regions DA1 and DA2 that are read fromimages of the color reference plate 43, based on the RGB format readdata, and detects the original document regions DA1 and DA2 based on thediscrimination result.

The tilt correction processor 75 performs a tilt correction process ofcorrecting the tilt of the original document region DA. Specifically,the tilt correction processor 75 detects a tilt angle θ of the originaldocument region DA1 with respect to the first read data SD1, andperforms a tilt correction process of tilting the original documentregion DA1 in a direction of eliminating a skew of the tilt angle θ. Thetilt correction processor 75 detects the tilt angle θ of the originaldocument region DA2 with respect to the second read data SD2, andperforms a tilt correction process of tilting the original documentregion DA2 in a direction of eliminating a skew of the tilt angle θ.

In particular, the tilt correction processor 75 analyzes the read dataSD1 and SD2 obtained by reading both sides of the original document 14in the reading portions 40A and 40B, respectively, and detects the tiltangles θ at which the original document regions DA1 and DA2 in the readdata SD1 and SD2 are tilted in the sub-scanning direction Y. Then, thetilt correction processor 75 acquires analysis results such as tiltangles θ and −θ of the original document regions DA1 and DA2. The tiltcorrection processor 75 performs a tilt correction process of rotatingthe original document regions DA1 and DA2 by an angle −θ at which thetilt angles θ of the original document regions DA1 and DA2 become 0°.The tilt correction processor 75 may be configured by, for example, anASIC included in the computer 60, or may be configured by a CPU thatexecutes a tilt correction process program.

Here, the front side P1 of the original document is referred to as a“first side P1”, and the rear side P2 of the original document isreferred to as a “second side P2”. The tilt correction processor 75performs the following process. When the edge detection process for thefirst side is successful, the tilt correction processor 75 performs atilt correction process of tilting the original document region DA1 ofthe first side at a tilt angle specified based on the edge detectionresult of the first side. When the edge detection process for the secondside is successful, the tilt correction processor 75 performs a tiltcorrection process of tilting the original document region DA2 of thesecond side at a tilt angle specified based on the edge detection resultof the second side.

When an edge cannot be detected on a side through the edge detectionprocess and detection of the original document region DA fails, theoriginal document region DA of the side for which the detection fails isspecified based on a detection result of an edge for a side for whichdetection is successful using a relationship between positions or tiltsof the front side and the rear side of the original document. Therefore,a tilt correction process on the original document region DA of thefailure side becomes possible.

That is, when the edge detection process for the first side fails andthe edge detection process for the second side is successful, the tiltcorrection processor 75 performs a tilt correction process of tiltingthe original document region DA1 of the first side specified based onthe edge detection result of the second side for which detection issuccessful, at the tilt angle specified similarly. That is, when theedge detection process for the first side is successful and the edgedetection process for the second side fails, the tilt correctionprocessor 75 performs a tilt correction process of tilting the originaldocument region DA2 of the second side specified based on the edgedetection result of the first side for which detection is successful, atthe tilt angle specified similarly.

The cutout processor 76 performs a cutout process of cutting out theoriginal document region DA from the read data SD. The cutout processor76 generates image data GD of the original document through the cutoutprocess. Specifically, the cutout processor 76 performs a cutout processof cutting out the original document region DA1 from the first read dataSD1 of the front side to generate image data GD1 of the originaldocument front side, and a cutout process of cutting out the originaldocument region DA2 from the second read data SD2 of the rear side togenerate image data GD2 of the original document rear side.

Here, the front side P1 of the original document is referred to as a“first side P1”, and the rear side P2 of the original document isreferred to as a “second side P2”. The cutout processor 76 performs thefollowing process. When the edge detection process for the first side issuccessful, the cutout processor 76 performs a cutout process of cuttingout the original document region DA1 of the first side to generate imagedata of the first side. When the edge detection process for the secondside is successful, the cutout processor 76 performs a cutout process ofcutting out the original document region DA2 of the second side togenerate image data of the second side.

When the edge detection process for the first side fails and the edgedetection process for the second side is successful, the cutoutprocessor 76 performs a cutout process of the original document regionDA1 specified based on the edge detection result of the second side forwhich detection is successful from the first read data SD1 to generatethe image data GD1 of the first side. When the edge detection processfor the first side is successful and the edge detection process for thesecond side fails, the cutout processor 76 performs a cutout process ofcutting out the original document region DA2 of the second sidespecified based on the edge detection result of the first side for whichdetection is successful from the second read data SD2 to generate theimage data GD2 of the second side.

The rotation processor 77 performs a rotation process of rotating theimage data GD in order to align an orientation of the image data GD ofthe original document. Specifically, the rotation processor 77determines a rotation angle for aligning an orientation of the imagedata GD1 of the original document front side, and performs a rotationprocess to rotate the image data GD1 of the front side by the determinedrotation angle. The rotation processor 77 determines a rotation anglefor aligning an orientation of the image data GD2 of the originaldocument rear side, and performs a rotation process of rotating theimage data GD2 of the rear side by the determined rotation angle.

In particular, the rotation processor 77 determines the rotation anglesfor rotating the image data GD1 and GD2 based on a character detectionresult of detecting orientations of characters included in the imagedata GD1 and GD2. The rotation processor 77 of the present embodimentacquires binding position information that is information indicating abinding position of the original document. There are two methods ofacquiring the binding position information. One is a method of detectinga binding mark at a binding position from an image, and the other is amethod in which a user gives the binding position information to thecontrol portion 50 of the image reading apparatus 11 by operating theoperation portions 21 and 101. When the former method is used, therotation processor 77 performs a binding position detection process.When the latter method is used, one option is selected, for example,from among a plurality of binding method options including “horizontalbinding” (refer to FIGS. 8 and 9) and “upper binding” (refer to FIGS. 10and 11).

The image processing section 73 is configured as a functionalconstituent generally configured with software in the control portion 50by the computer 60 executing the program PR stored in the storagesection 61 and illustrated in the flowcharts of FIGS. 22 to 25. Theimage processing section 73 includes the edge detection processor 74,the tilt correction processor 75, the cutout processor 76, and therotation processor 77 generally configured with software. Some of theedge detection processor 74, the tilt correction processor 75, and thecutout processor 76 may be hardware configured with an electroniccircuit such as an ASIC.

In the present embodiment, the image processing section 73 performsfirst image processing illustrated in the flowchart of FIG. 22 andsecond image processing illustrated in the flowcharts of FIGS. 23 to 25.The edge detection processor 74, the tilt correction processor 75, andthe cutout processor 76 are started when the image processing section 73performs the first image processing. The image data GD1 of the originaldocument front side and the image data GD2 of the original document rearside are generated through the first image processing.

The rotation processor 77 is started when the image processing section73 performs the second image processing. The image processing section 73performs a rotation process of rotating the image data GD1 of theoriginal document front side and the image data GD2 of the originaldocument rear side by a predetermined rotation angle in order to alignthe image data GD1 and GD2 in an appropriate orientation based onorientations of characters detected through a character detectionprocess. When a character detection fails on a side for which characterscannot be detected through the character detection process, a rotationangle required for a rotation process of rotating image data of thecharacter detection failure side is determined based on a characterdetection result of a character detection successful side and bindingposition information.

Here, one of the front side P1 and the rear side P2 of the originaldocument will be referred to as a first side, and a side opposite to thefirst side will be referred to as a second side. For example, the frontside P1 will be referred to as a “first side P1”, and the rear side P2of the original document will be referred to as a “second side P2”. Therotation processor 77 performs the following process. When a characterdetection process on an image of the first side is successful, therotation processor 77 performs a rotation process of rotating the imagedata GD1 of the first side by a rotation angle that is specified basedon an orientation of a character specified from a character detectionresult of the first side. When a character detection process on an imageof the second side is successful, the rotation processor 77 performs arotation process of rotating the image data GD2 of the second side by arotation angle that is specified based on an orientation of a characterspecified from a character detection result of the second side.

When a character detection process on an image of the first side failsand a character detection process on an image of the second side issuccessful, the rotation processor 77 performs a rotation process ofrotating the image data GD1 of the first side by a rotation angle thatis specified based on a character detection result of the image of thesecond side for which detection is successful and binding positioninformation. When a character detection process on an image of the firstside is successful and a character detection process on an image of thesecond side fails, the rotation processor 77 performs a rotation processof rotating the image data GD2 of the second side by a rotation anglethat is specified based on a character detection result of the image ofthe first side for which detection is successful and binding positioninformation.

The image processing section 73 converts the image data GD1 and GD2subjected to the rotation process, into a file with a format designatedby the user. The image processing section 73 converts the image data GD1and GD2 subjected to the rotation process into a file with a formatcorresponding to format designation information in the reading conditioninformation. As the format designation information, any one of aplurality of prepared formats such as a JPEG format, a PDF format, and aGIF format is designated. The image processing section 73 transmits thefile with the designated format to a designated transmission destinationvia the output section 63. The image processing section 73 transmits theimage data GD1 and GD2 converted into the file with the designatedformat to, for example, the host apparatus 100.

FIG. 4 illustrates the read data SD1 of the front side obtained by thefirst image sensor 42A reading the front side P1 (refer to FIG. 12) ofthe original document 14, and the read data SD2 of the rear sideobtained by the second image sensor 42B reading the rear side P2 (referto FIG. 12) of the original document 14. FIG. 4 illustrates an exampleof the read data SD1 and SD2 that is read in a state in which theoriginal document 14 is skewed. In the present embodiment, the frontside P1 of the original document 14 corresponds to the first side, andthe rear side P2 of the original document 14 corresponds to the secondside.

The image sensors 42A and 42B start reading at a timing slightly beforethe leading end of the original document 14 reaches the readingpositions of the image sensors 42A and 42B, and finishes the reading ata timing slightly after the trailing end of the original document 14passes through the reading position. Therefore, as illustrated in FIG.4, the read data SD1 of the front side is data including the originaldocument region DA1 in the rectangular reading region SA1. The read dataSD2 of the rear side is data including the original document region DA2in the rectangular reading region SA2. When the front side and the rearside of the original document 14 are not particularly differentiatedfrom each other, the read data, the reading region, and the originaldocument region are referred to simply as the read data SD, the readingregion SA, and the original document region DA.

First, the edge EG1 (side) of the original document region DA1 isdetected in the read data SD1. That is, the background region BA1 otherthan the original document region DA1 of the read data SD1 is an imageportion obtained by reading the color reference plate 43. The colorreference plate 43 exhibits an achromatic color different from a colorof the medium itself of the original document 14. Specifically, thecolor reference plate 43 exhibits gray. Thus, a boundary line based on acolor difference or a density difference appears between the medium (forexample, paper), that is normally white, of the original document 14 andthe color reference plate 43. The edge detection processor 74 detectsthe boundary line between the original document region DA1 and thebackground region BA1 based on the color difference or the densitydifference. The side of the original document region DA1 is recognizedfrom the boundary line. The original document region DA1 is specified byspecifying four sides of the original document region DA1. Similarly,the original document region DA2 is specified by detecting the edge EG2(side) of the original document region DA2 in the read data SD2 of therear side. When the original document regions DA1 and DA2 are specified,position coordinates, sizes, and tilt angles θ of the original documentregions DA1 and DA2 are obtained. The tilt angles θ are calculated astilt angles θ of the original document regions DA1 and DA2 with respectto the sub-scanning direction Y.

Here, as illustrated in FIG. 4, it is assumed that the tilt angle θ ofthe original document region DA1 in the first read data SD1 is θ1 andthe tilt angle θ of the original document region DA2 in the second readdata SD2 is θ2. There is a relationship of θ1=−θ2 between the tilt angleθ1 of the original document region DA1 of the front side and the tiltangle θ2 of the original document region DA2 of the rear side.

Here, when a density of the characters or pictures printed on theoriginal document 14 is low, the reading portions 40A and 40B perform aprocess of automatically increasing a reading density. Thus, when thecharacters or pictures on the original document 14 are thin and theoriginal document 14 has wrinkles, the wrinkles are read deeply. In thiscase, when the wrinkles of the read original document 14 are present tointersect the rectangular sides of the original document 14, the edgedetection processor 74 cannot differentiate the boundary line of theoriginal document region DA1 from the wrinkles. As a result, when theoriginal document 14 has many wrinkles, the edge detection processor 74cannot correctly detect the edges due to the wrinkles, and cannotspecify the original document region DA. When the original documentregion DA is not specified, the position coordinates and the tilt angleθ of the original document region DA cannot be calculated. Therefore, atilt correction error, a cutout error, and a rotation process erroroccur.

The tilt correction process, the cutout process, and the rotationprocess are separately performed on the front side and the rear side ofthe original document 14. In the present embodiment, when the originaldocument region DA of one of the front side and the rear side of theoriginal document 14 cannot be specified, the position coordinates andthe tilt angle θ of the original document region DA of a side of whichthe original document region DA cannot be specified are specified basedon an edge detection result of a side of which the original documentregion DA can be specified of the front side and the rear side, and atilt correction process and a cutout process for the original documentregion DA of the side of which the original document region DA cannot bespecified are performed.

Here, the position coordinates and the tilt angle θ of the originaldocument region DA correspond to examples of image processing variablesnecessary for performing predetermined image processing such as the tiltcorrection process. When an edge detection process for one side fails,the position coordinates and the tilt angle θ of the original documentregion DA with respect to an image of the failure side are specifiedbased on values of the position coordinates and the tilt angle θ of theoriginal document region DA specified from an edge detection processresult of an image of the other side for which an edge can be detected.The position coordinates of the original document region DA correspondto an example of image processing variables necessary for performing apredetermined image processing such as a cutout process. When an edgedetection process for one side fails, a cutout process is performedbased on values of position coordinates of the original document regionDA of an image of one side, based on values of the position coordinatesof the original document region DA specified from an edge detectionprocess result of an image of the other side for which the edge can bedetected. The edge detection process performed to acquire the tilt angleθ corresponds to an example of a tilt angle detection process. The edgedetection process performed to acquire the original document regioncorresponds to an example of a region detection process.

As illustrated in FIG. 5, when an edge detection process for the frontside is successful and an edge detection process for the rear sidefails, position coordinates in the sub-scanning direction Y are thesame, and an x coordinate value of a vertex at a position that islinearly symmetric thereto with respect to a line parallel to thesub-scanning direction Y passing through the center O of the originaldocument region DA1 is calculated. This calculation is performed on fourvertices.

Here, assuming that the center of the original document region DA1 isthe origin on the coordinates, the following relationship isestablished. Assuming that coordinates of the four vertices A, B, C, andD of the original document region DA1 corresponding to one side of theoriginal document are (x1,y1), (x2,y2), (x3,y3), and (x4,y4),coordinates of four vertices E, F, G, and H of the original documentregion DA2 of the other side (for example, the rear side) of theoriginal document are (−x1,y1), (−x2,y2), (−x3,y3), and (−x4,y4).Therefore, when an edge can be detected for one side, even though anedge cannot be detected for the other side, the coordinate values of thefour vertices of the original document region DA2 of the other side canbe specified from the coordinate values of the four vertices of theoriginal document region DA1 of one side, and thus the original documentregion DA2 of the other side can be specified from the coordinate valuesof the four vertices. The tilt angle θ1 is −θ2. In the above-describedway, the coordinate values of the four vertices and the tilt angle θ ofthe original document region DA of the other side for which the edgecannot be detected are specified. Thus, the tilt correction process andthe cutout process for the original document region DA can be performedon the other side for which edge detection has failed. For convenienceof description, the center O of the original document region DA1 isassumed to be the origin, but the coordinate values of the four verticescan be calculated regardless of a set position of the origin. Theprocess of calculating the position coordinate values of the originaldocument region DA of the other side based on the position coordinatevalues of the original document region DA of one side illustrated inFIG. 5 corresponds to a process of specifying a value of an imageprocessing variable for an image of one side (the rear side in theexample illustrated in FIG. 5) for which detection fails based on avalue of an image processing variable specified from a detection resultof an image of the other side (the front side in the example illustratedin FIG. 5) for which detection is successful.

As illustrated in FIG. 6, as a result of performing the tilt correctionprocess on the read data SD1 and SD2, the original document regions DA1and DA2 are corrected in the orientation without skew. The originaldocument regions DA1 and DA2 are cut out from the read data SD1 and SD2illustrated in FIG. 6 by the cutout processor 76, and thus the imagedata GD1 and GD2 is generated. As illustrated in FIGS. 8 to 11, theimage data GD1 and GD2 include characters or character strings forming asentence or the like written in the original document. The rotationprocessor 77 performs a rotation process of rotating the image data GD1and GD2 of the original document in order to align orientations of thecharacters included in the original document region DA. Thus, therotation processor 77 performs a character detection process ofdetecting characters in the image data GD1 and GD2.

Character Detection Process

The rotation processor 77 performs a character detection process ofdetecting characters as a predetermined detection process. Aspredetermined image processing, the rotation processor 77 determines arotation angle for rotating the image data GD1 and GD2 based on acharacter detection result, and performs a rotation process of rotatingthe image data GD1 and GD2 by the determined rotation angle. When thecharacter detection process fails, a rotation angle for rotating animage of a failure side cannot be specified. Thus, a rotation angle forrotating the image of one side for which character detection fails isspecified based on a rotation angle that is specified from a valueindicating an orientation of a character specified from a detectionresult of the other side for which character detection is successful andbinding position information. The rotation processor 77 performs arotation process of rotating the image of the side for which thecharacter detection fails by the specified rotation angle. This rotationangle corresponds to an example of an image processing variablenecessary for performing predetermined image processing such as arotation process of rotating image data.

Specifically, the storage section 61 stores a registered character inadvance. The registered character is, for example, a character in which,even when the character is inverted upside down, the inversion can beidentified, among numbers and alphabets. That is, a character of whichan upper half and a lower half are not in a linear symmetricrelationship and a right half and a left half are not in a linearsymmetric relationship is registered as the registered character.

When the character detection process is performed, the rotationprocessor 77 detects a character that matches the registered characterfrom a character string read from the original document 14. The rotationprocessor 77 detects the registered character through, for example, apattern matching process. When the registered character is detected, anorientation of the detected registered character is then determined.Orientations of the original document regions DA1 and DA2 are alignedsuch that orientations of the characters are aligned. That is, therotation processor 77 performs a rotation process of aligning theorientations of the characters on the cut-out original document regionsDA1 and DA2.

FIG. 8 illustrates the image data GD1 obtained by reading the front sideof the original document 14, and FIG. 9 illustrates the image data GD2obtained by reading the rear side of the original document 14. Asillustrated in FIGS. 8 and 9, characters are written in the image dataGD1 and GD2 of the original document. In the examples illustrated inFIGS. 8 and 9, alphabets and numbers are written as the characters. Therotation processor 77 performs a character detection process ofdetecting a registered character from among the characters in theoriginal document. When the registered character is detected, therotation processor 77 detects an orientation of the detected registeredcharacter. Here, the rotation processor 77 configured by the computer 60handles an orientation of the character as, for example, a 2-bitnumerical value. For example, as the orientation of the character, fourorientations are defined every 90 degrees, and are respectivelyindicated by values of “00”, “01”, “10”, and “11”. Therefore, a value ofan image processing variable specified from a detection result in thecharacter detection process is indicated by a 2-bit value in thisexample.

Binding Position Detection Process

The rotation processor 77 of the present embodiment performs a bindingposition detection process of detecting a binding position on the imagedata GD1 and GD2 of the original document. The binding positiondetection process is a process of detecting a binding position of theoriginal document 14 from the image data GD1 and GD2. A binding methodaccording to a difference in a binding position of the original document14 includes “horizontal binding” illustrated in FIGS. 8 and 9 and “upperbinding” illustrated in FIGS. 10 and 11.

For example, when printing is performed by a printing apparatus (notillustrated) according to a designated binding method, a binding marginregion FA indicated by a two-dot chain line in FIGS. 8 and 9 is set at adesignated edge of the original document, and a character string such asa sentence or a picture is printed in a region other than the bindingmargin region FA. The user binds the original documents 14 at thebinding margin region FA using a binding device such as a puncher or astapler.

Examples of binding methods include a method of punching holes in abinding margin of the original document 14 and binding a plurality oforiginal documents 14 with a binder or the like, and a method ofstacking a plurality of original documents 14 in a state in whichbinding margins are aligned and binding the original documents 14 with astapler. A plurality of original documents 14 bound in this way may bescanned. In this case, the plurality of original documents 14 may havepunch holes in the binding margin or have staple marks of a stapler.

A read image obtained by reading the original document 14 may includestaple marks of a stapler or punch holes in an identifiable manner. Inthe examples illustrated in FIGS. 8 and 9, in the binding margin regionFA of the image data GD1 and GD2 of the original document, there arebinding marks such as punch holes as targets for detecting a bindingposition. The rotation processor 77 performs a binding positiondetection process of detecting a binding position in the image data GD1and GD2 of the original document by detecting punch holes or staplemarks on an image based on the image data GD1 and GD2 of the originaldocument. In the above-described way, the rotation processor 77 of thepresent embodiment performs the character detection process and thebinding position detection process. Instead of the binding positiondetection process or in addition to the binding position detectionprocess, the user may input information regarding a binding position tothe control portion 50 of the image reading apparatus 11 or the hostapparatus 100 by operating the operation portion 21 of the image readingapparatus 11 or the operation portion 101 of the host apparatus 100.Regarding designation of the binding position, for example, it isdesignated whether a plurality of original documents to be scanned aresubjected to “horizontal binding” or “upper binding” from a selectionfield, displayed on the display portions 22 and 102, in which“horizontal binding” and “upper binding” are selectable. The imageprocessing section 73 configured by the computer 60 performs the bindingposition detection process or inputs binding position information. Inthis example, as the binding position information, there are two piecesof information such as “horizontal binding” and “upper binding”, whichare represented by, for example, 1-bit values “0” and “1”.

FIGS. 8 and 9 illustrate images obtained by reading both sides of ahorizontally bound original document. FIG. 8 illustrates an image of theoriginal document front side, and FIG. 9 illustrates an image of theoriginal document rear side. In the horizontal binding methodillustrated in FIGS. 8 and 9, an orientation of a character is parallelto a long side of the original document, an upper part of the characteris directed toward one short side, and a direction of a character string(writing direction) is parallel to a short side of the originaldocument. The binding margin region FA is secured at a side edge alongone long side of the original document. The binding margin of theoriginal document front side and the binding margin of the originaldocument rear side are located on opposite sides in regions other thanthe binding margins, that is, regions where the character string or thelike is disposed. In other words, as illustrated in FIGS. 8 and 9, inthe “horizontal binding”, when the original document is disposed in anorientation in which the characters are readable, the binding marginsare located on the left or right side of the regions where thecharacters are disposed, and positions of the binding margins arelaterally opposite to each other on the front side and the rear side ofthe original document.

In the upper binding method illustrated in FIGS. 10 and 11, anorientation of a character is parallel to the short side of the originaldocument, an upper part of the character is directed toward one longside, and a direction of a character string is parallel to the long sideof the original document. The binding margin region FA is secured at aside edge along one long side of the original document. The bindingmargin of the original document front side and the binding margin of theoriginal document rear side are located on opposite sides in the regionswhere the character string or the like is disposed. In other words, asillustrated in FIGS. 10 and 11, in the “upper binding”, when theoriginal document is disposed in an orientation in which the charactersare readable, the binding margin is located above or below thecharacters. The orientations of the characters refer to orientations inwhich the characters are readable, and orientations in which the upperparts of the characters are on upper sides.

Next, an operation of the image reading apparatus 11 will be described.

The user sets reading conditions in the image reading apparatus 11 byoperating the operation portion 21 of the image reading apparatus 11 orthe operation portion 101 of the host apparatus 100. Specifically, theuser sets the original document 14 on the platen 13A of the originaldocument support 13 of the image reading apparatus 11, and then operatesthe operation portions 21 and 101 to select the reading conditionsincluding a reading resolution (600 dpi/300 dpi), a color mode(color/grayscale), and a reading method (single-sidedreading/double-sided reading). In this case, the user who desiresdouble-sided reading of the original document 14 designates thedouble-sided reading. The user operates the operation portions 21 and101 to give an instruction for execution of scanning. The scanninginstruction includes reading condition information. When the readinginstruction is received, the image reading apparatus 11 starts readingthe set original document.

The transport control section 71 of the control portion 50 controlsdriving of the motors 37 and 38 that are drive sources of the transportmechanism 30, and thus the original documents 14 set on the platen 13Aare fed one by one in order from the lowest one.

In the image reading apparatus 11, the reading portion 40 reads theoriginal document that is being transported at a reading position.Specifically, during the double-sided reading, the first image sensor42A reads the front side P1 of the original document 14, and the secondimage sensor 42B reads the rear side P2 of the original document 14. Inthis case, each of the image sensors 42A and 42B reads the originaldocument 14 and the color reference plate 43 as the background thereof.

Reading signals output from the image sensors 42A and 42B are input tothe image processing section 73 as read data via the AFE 65. That is, asillustrated in FIG. 4, the read data SD includes the original documentregion DA and the background region BA in the rectangular reading regionSA. For example, when a skew occurs in a case where an original documentis transported, the original document is tilted with respect to thetransport direction Y1 as illustrated in FIG. 4. Therefore, each of theimage sensors 42A and 42B reads the tilted original document. As aresult, the original document region DA is tilted at a predeterminedangle in the reading region SA of the read data SD.

Meanwhile, when the original document has wrinkles or a background colorof the original document is similar to a color of the color referenceplate, an edge that is a boundary between the original document regionDA and the background region BA cannot be detected in the read data SDin some cases. When the edge cannot be detected, the tilt correctionprocess, the cutout process, and the rotation process cannot beperformed in the related art. In the present embodiment, even though anedge for one side of both sides of the original document is not detectedduring double-sided reading, when an edge is detected for the oppositeside, the tilt correction process and the cutout process for that sideare performed based on a tilt correction value of the side for which theedge can be detected.

In the present embodiment, the character detection process is performedas a predetermined detection process. For a side for which a characteris not detected through the character detection process, when thecharacter can be detected for an opposite side, an orientation of thecharacter for the side for the character cannot be detected is estimatedbased on a detection result of the side for which the character can bedetected, and a rotation process is performed according to the estimatedcharacter orientation.

In this case, in the present embodiment, information regarding anoriginal document binding method is used. There are generally“horizontal binding” and “upper binding” as the original documentbinding method. As a predetermined detection process, the bindingposition detection process is performed. For a side for which a bindingmark is not detected through the binding position detection process,when the binding mark can be detected for an opposite side, a bindingmethod for the side for which the binding mark cannot be detected isestimated based on a detection result of the side for which the bindingmark can be detected, and a rotation process is performed according tothe estimated binding method.

Next, the first image processing routine will be described withreference to FIG. 22. This first image processing routine is performedby the computer 60 of the control portion 50 executing the program PRwhen a scanning instruction is received from the host apparatus operatedby the user. After the original document 14 is set on the platen 13A ofthe original document support 13 of the image reading apparatus 11, theuser operates the operation portion 101 such as a mouse of the hostapparatus 100 to select reading conditions including a readingresolution (600 dpi/300 dpi), a color mode (color/grayscale), and areading method (single-sided reading/double-sided reading), and thengives an instruction for execution of scanning. When the instruction forexecution of scanning is received, the control portion 50 (computer 60)executes the first image processing routine illustrated in FIG. 22.

The control portion 50 causes the computer 60 to execute the first imageprocessing routine. In the first image processing, the edge detectionprocessor 74, the tilt correction processor 75, and the cutout processor76, which are software configured by the computer 60 executing theprogram, are started at predetermined timings. The first imageprocessing includes an edge detection process as a predetermineddetection process, and includes a tilt correction process and a cutoutprocess as predetermined image processing.

First, in step S11, the control portion 50 performs an edge detectionprocess on the front side of the original document. Specifically, theedge detection processor 74 performs the edge detection process. Theedge detection processor 74 performs, for example, a binarizationprocess on read data of the front side, and detects an edge of which adensity difference exceeds a predetermined threshold value. Since aregion of the original document is white and the background is gray, aboundary line between the original document and the background isdetected as the edge. That is, a contour line of the original documentis detected as an edge. The original document is rectangular, and evenwhen four sides thereof are slightly cut off, four vertices of theoriginal document region can be specified from intersections ofextension lines extending partial straight lines of the four sides. Whenthe edges are detected at a level at which the four sides, which arecontour lines of the original document, can be specified inabove-described way, it is assumed that the edges for the originaldocument front side can be detected. When the original document 14 haswrinkles or a background color of the original document 14 is similar toa color of the color reference plate 43, the edges cannot be detected ata level at which four sides of the original document region DA1 in theread data SD1 can be specified.

In step S12, it is determined whether or not an edge can be detected forthe front side. When the edge can be detected for the front side, theflow proceeds to step S13, and, when the edge cannot be detected for thefront side, the flow proceeds to step S16.

In step S13, the control portion 50 sets an edge detection flag F1 to“1” (F1=1).

In step S16, the control portion 50 sets the edge detection flag F1 to“0” (F1=0).

In step S14, the control portion 50 performs a tilt correction processon the original document front side. Specifically, the tilt correctionprocessor 75 performs the tilt correction process. The tilt correctionprocessor 75 obtains a tilt angle θ of the original document region DA1specified by the four sides where edges can be detected in the read dataSD1 of the front side, and calculates a tilt correction value foreliminating the tilt angle θ. This tilt correction value is indicated bya rotation angle for correcting the tilt due to a skew of the originaldocument 14, and is, for example, a value within a range of −45°<θ<45°.The tilt correction processor 75 corrects the tilt of the originaldocument region by rotating the original document region DA based on thetilt correction value by, for example, a correction angle −θ less than±45°. As a result, as illustrated in FIG. 6, the original documentregion DA1 is corrected to a posture angle without the tilt.

In step S15, the control portion 50 performs a cutout process on theoriginal document front side. Specifically, the cutout processor 76performs the cutout process on the original document front side. Thecutout processor 76 cuts out the original document region DA1corresponding to the original document front side after tilt correctionfrom the reading region SA1 defined by the read data SD1 of the frontside. As a result of the cutout process, the original document regionDA1 is cut out, and thus the image data GD1 of the original documentfront side illustrated in FIG. 7 is acquired.

In the next step S17, the control portion 50 performs an edge detectionprocess on the original document rear side. Specifically, the edgedetection processor 74 performs the same edge detection process as theprocess performed on the read data SD1 of the original document frontside on the read data SD2 (refer to FIG. 4) of the original documentrear side. As a result of the edge detection process, a contour line ofthe original document rear side is detected as an edge. Even when thefour sides of the original document are slightly cut off, the fourvertices of the original document region can be specified from theintersections of extension lines extending the partial straight lines ofthe four sides. When the edges are detected at a level at which the foursides, which are the contour lines of the original document, can bespecified in above-described way, it is assumed that the edges for theoriginal document rear side can be detected. As described above, whenthe original document 14 has wrinkles or a background color of theoriginal document 14 is similar to a color of the color reference plate43, the edges cannot be detected at a level at which four sides of theoriginal document region DA2 in the read data SD2 can be specified. Inthe present embodiment, the processes in steps S11 and S17 correspond toexamples of a detection process step of performing a predetermineddetection process, a tilt angle detection process step of detecting atilt angle of an image, and a region detection process step of detectingan original document region.

In step S18, the control portion 50 determines whether or not the edgecan be detected for the rear side. When the edge can be detected for therear side, the flow proceeds to step S19, and, when the edge cannot bedetected for the rear side, the flow proceeds to step S24.

In step S19, the control portion 50 performs a tilt correction processon the original document rear side. Specifically, the tilt correctionprocessor 75 performs the same tilt correction process as the processperformed on the front side, on the read data SD2 of the rear side. Thetilt correction processor 75 obtains a tilt of the original documentregion DA2 specified by the four sides where the edge can be detected inthe read data SD2 of the rear side, and calculates a tilt correctionvalue for eliminating the tilt. The tilt correction processor 75corrects the tilt of the original document region DA2 by rotating theoriginal document region DA2 by, for example, a correction angle −θ lessthan ±45° based on the tilt correction value. As a result, asillustrated in FIG. 6, the original document region DA2 is corrected toa posture angle without the tilt.

In step S20, the control portion 50 performs a cutout process on theoriginal document rear side. Specifically, the cutout processor 76performs the cutout process on the original document rear side. Thecutout processor 76 cuts out an original document region DA2corresponding to the original document rear side after tilt correctionfrom the reading region SA2 defined by the read data SD2 of the rearside. As a result of the cutout process, the original document regionDA2 is cut out, and thus the image data GD2 of the original documentrear side illustrated in FIG. 7 is acquired.

In step S21, the control portion 50 determines whether or not the edgedetection flag F1 is 0. When F1 is 0, the flow proceeds to step S22,and, when F1 is not 0, the routine is finished.

In step S22, the control portion 50 performs a tilt correction processon the original document front side based of the rear side correctionvalue. That is, when the edge for the original document front sidecannot be detected (F1=0), the tilt correction process is performed onthe original document front side using the tilt correction value of therear side that is an opposite side for which the edge can be detected.Here, as illustrated in FIG. 5, when the original document is skewed,the original document tilted at a predetermined angle with respect tothe sub-scanning direction Y is read from the front side and the rearside, and thus the tilt angles θ1 and θ2 with respect to thesub-scanning direction Y are the same as each other but tilt directionsare opposite to each other. That is, θ1=−θ2. From this relationship, inthe read data SD, coordinates of the vertices of the original documentregion DA1 of the front side and coordinates of the vertices of theoriginal document region DA2 of the rear side have a positionalrelationship in which coordinate values in the sub-scanning direction Yare the same as each other, and coordinate values in the main scanningdirection X are linearly symmetric to each other with respect to avirtual line passing through the center of the original document andparallel to the sub-scanning direction Y.

Here, assuming that an x coordinate of the center of the originaldocument region DA is the origin, the following relationship isestablished. Assuming that coordinates of four vertices of the originaldocument region DA1 corresponding to one side of the original documentare (x1,y1), (x2,y2), (x3,y3), and (x4,y4), coordinates of four verticescorresponding to the other side of the original document are indicatedby (−x1,y1), (−x2,y2), (−x3,y3), and (−x4,y4). Therefore, when an edgecan be detected for one side, even though the edge cannot be detectedfor the other side, the coordinates of the four vertices of the originaldocument region of the other side can be specified from the coordinatesof the four vertices of the original document region of one side, andthus the original document region DA1 of the other side can be specifiedfrom the coordinates of the four vertices. A relationship between tiltangles of the front side and the rear side of the original document is arelationship between one tilt angle θ and the other tilt angle −θ. Inthe above-described way, the original document region DA1 of the frontside for which the edge cannot be detected and the tilt angle θ arespecified. For convenience of description, the x coordinate of thecenter of the original document is assumed to be the origin, but thecoordinate values of the four vertices can be calculated regardless of aset position of the origin.

In step S23, the control portion 50 performs a cutout process on theoriginal document front side. Specifically, the cutout processor 76 cutsout the original document region DA1 corresponding to the originaldocument front side after the tilt correction from the reading regionSA1 defined by the read data SD1 of the front side. As a result of thecutout process, the original document region DA1 is cut out, and thusthe image data GD1 of the original document front side illustrated inFIG. 7 is acquired.

On the other hand, when the edge cannot be detected for the rear side,in step S24, the control portion 50 determines whether or not the edgedetection flag F1 is 1. When F1 is 1, the flow proceeds to step S25,and, when F1 is not 1, the routine is finished.

In step S25, a tilt correction process is performed on the originaldocument rear side based of the front side correction value. That is,when the edge for the original document rear side cannot be detected,the tilt correction process is performed on the original document rearside using the tilt correction value of the front side that is anopposite side for which the edge can be detected. That is, therelationship illustrated in FIG. 5 described above, that is, therelationship between the coordinates (x1,y1), (x2,y2), (x3,y3), and(x4,y4) of the four vertices of the original document region DA1corresponding to one side of the original document and the coordinates(−x1,y1), (−x2,y2), (−x3,y3), and (−x4,y4) of the four verticescorresponding to the other side of the original document is used.Therefore, when the edge can be detected for one side, even though theedge cannot be detected for the other side, the four vertices of theoriginal document region of the other side are specified from thecoordinates of the four vertices of the original document region of oneside, and the original document region DA2 of the other side isspecified from the specified coordinates of the four vertices. There isa relationship of θ1=−θ2 between the tilt angle θ1 of the originaldocument region DA1 of the front side and the tilt angle θ2 of theoriginal document region DA2 of the rear side. In the above-describedway, the original document region DA2 of the rear side for which theedge cannot be detected and the tilt angle θ are specified.

In step S26, the control portion 50 performs a cutout process on therear side. Specifically, the cutout processor 76 cuts out the originaldocument region DA2 corresponding to the original document rear sideafter the tilt correction from the reading region SA2 defined by theread data SD2 of the rear side. As a result of the cutout process, theoriginal document region DA2 is cut out, and thus the image data GD2 ofthe original document rear side illustrated in FIG. 7 is acquired.

In the present embodiment, the processes in steps S14, S15, S19, S20,S22, S23, S25, and S26 correspond to an example of an image processingstep in which predetermined image processing is performed. The processesin steps S14, S19, S22, and S25 correspond to an example of a tiltcorrection process step. The processes in steps S15, S20, S23, and S26correspond to an example of a cutout process step.

Next, the second image processing routine will be described withreference to FIG. 23.

First, in step S31, the control portion 50 performs a characterdetection process of detecting a character on the front side. Thecontrol portion 50 performs, for example, a pattern matching process onthe image data GD1 of the front side using a predetermined registeredcharacter stored in advance in the storage section 61, to detect acharacter of which a similarity to the registered character is equal toor more than a threshold value. When a character is detected, thecontrol portion 50 recognizes an orientation of the character from thedetected character.

For example, in the example of the image data GD1 of the front sideillustrated in FIGS. 8 and 10, the alphabet “A” and the number “2” areincluded as the same characters as the registered characters. Therefore,the control portion 50 detects the characters “A” and “2” as a result ofthe character detection process. In the example of horizontal bindingillustrated in FIG. 8, regarding orientations of the characters “A” and“2”, the characters are disposed in an orientation in which the shortside of the original document is located above the characters. Asillustrated in FIG. 8, a binding position of the original document inwhich the binding marks PT are located in the image data GD1 correspondsto horizontal binding in which the binding marks PT are locatedhorizontally with respect to the characters in the original document. Inthe horizontally bound original document, the binding margin region FAis located at the lateral edge of the characters, and the binding marksPT such as punch holes are located in the binding margin region FA.

In the example of upper binding illustrated in FIG. 10, regardingorientations of the characters “A” and “2”, the characters are disposedin an orientation in which the long side of the original document islocated above the characters. As illustrated in FIG. 10, a bindingposition of the original document in which the binding marks PT arelocated in the image data GD1 corresponds to upper binding in which thebinding marks PT are located above the characters in the originaldocument. In the upper bound original document, the binding marginregion FA is located at the upper edge of the characters, and thebinding marks PT such as punch holes are located in the binding marginregion FA.

In step S32, the control portion 50 determines whether or not acharacter can be detected for the front side. When the character isdetected for the front side, a character detection flag F2 is set to “1”in step S33, and the flow proceeds to the next step S34. On the otherhand, when the character cannot be detected for the front side, thecharacter detection flag F2 is set to “0” in step S35, and the flowproceeds to step S36.

In step S34, the control portion 50 performs a rotation process on theoriginal document front side. The control portion 50 determines arotation angle at which a character orientation is vertical, andperforms a rotation process of rotating the image data GD1 of the frontside by the determined rotation angle. That is, as a result of therotation process, the image data GD1 of the front side is disposed inthe orientation illustrated in FIG. 8.

Here, when the horizontally bound original document 14A illustrated inFIG. 12 is scanned, the front side P1 and the rear side P2 have arelationship illustrated in FIG. 12. In the horizontally bound originaldocument 14A illustrated in FIG. 12, characters are symbolically writtenin alphabets, and “ABC” are printed on the front side P1 and “XYZ” areprinted on the rear side P2. There are four orientations for setting thehorizontally bound original document 14A on the platen 13A of theoriginal document support 13 as illustrated in FIGS. 13 to 16. Thehorizontally bound original document 14A set in these orientations isread in an orientation of the image data GD1 of the front side and anorientation of the image data GD2 of the rear side illustrated on thelower parts of the drawings. Thus, when each of image data GD1 and GD2is rotated by a predetermined rotation angle in a clockwise direction CWdescribed below, each of the image data GD1 and GD2 has charactersdisposed in an upright orientation as illustrated in FIGS. 8, 9, and 13.FIG. 13 illustrates an example in which the horizontally bound originaldocument 14A is set on the platen 13A such that the front side of thehorizontally bound original document 14A is read in a correctorientation.

In step S36, the control portion 50 performs a character detectionprocess on the rear side. The control portion 50 performs, for example,a pattern matching process on the image data GD2 of the rear side usingthe predetermined registered character stored in advance in the storagesection 61, to detect a character of which a similarity to theregistered character is equal to or more than a threshold value. When acharacter is detected, the control portion 50 recognizes an orientationof the character from the detected character.

For example, in the example of the image data GD2 of the rear sideillustrated in FIGS. 9 and 11, the alphabet “Y” and the number “7” areincluded as the same characters as the registered characters. Therefore,the control portion 50 detects the characters “Y” and “7” as a result ofthe character detection process. In the horizontally bound exampleillustrated in FIG. 9, the characters “Y” and “7” are disposed in anorientation in which the short side of the original document is locatedabove the character. In the present embodiment, the processes in stepsS31 and S36 correspond to an example of a predetermined detectionprocess. The processes in step S31 and step S36 correspond to an exampleof a character detection process step.

As illustrated in FIG. 9, a binding position of the original document inwhich the binding marks PT are located in the image data GD2 correspondsto horizontal binding in which the binding marks PT are locatedhorizontally with respect to the characters in the original document. Inthe horizontally bound original document 14A, the binding margin regionFA indicated by a two-dot chain line is located at the lateral edge ofthe characters, and the binding marks PT such as punch holes are locatedin the binding margin region FA.

In the example of upper binding illustrated in FIG. 11, regardingorientations of the characters “Y” and “7” are disposed in anorientation in which the long side of the original document is locatedabove the characters. As illustrated in FIG. 11, a binding position ofthe original document in which the binding marks PT are located in theimage data GD2 corresponds to upper binding in which the binding marksPT are located above the characters in the original document. In theupper bound original document 14B, the binding margin region FAindicated by the two-dot chain line is located at the upper edge of thecharacters, and the binding marks PT such as punch holes are located inthe binding margin region FA.

In step S37, the control portion 50 determines whether or not thecharacter can be detected for the rear side. When the character isdetected for the rear side, the flow proceeds to step S38. On the otherhand, when the character cannot be detected for the rear side, the flowproceeds to step S43.

In step S38, the control portion 50 performs a rotation process on theoriginal document rear side. The control portion 50 determines arotation angle at which a character orientation is vertical, andperforms a rotation process of rotating the image data GD2 of the rearside by the determined rotation angle. That is, as a result of therotation process, the image data GD2 of the rear side is disposed in theorientation illustrated in FIG. 9.

Here, when the upper bound original document 14B illustrated in FIG. 17is scanned, the front side P1 and the rear side P2 have a relationshipillustrated in FIG. 17. In the upper bound original document 14Billustrated in FIG. 17, the characters are symbolically written inalphabets, and “ABC” are printed on the front side P1 and “XYZ” areprinted on the rear side P2. There are four orientations for setting theupper bound original document 14B on the platen 13A of the originaldocument support 13 as illustrated in FIGS. 18 to 21. The upper boundoriginal document 14B set in these orientations is read in anorientation of the front image data GD1 of the front side and theorientation of the image data GD2 of the rear side illustrated on thelower parts of the drawings. Thus, when each of the image data GD1 andGD2 is rotated by a predetermined rotation angle in the clockwisedirection CW described below, each of the image data GD1 and GD2 hascharacters disposed in an upright orientation as illustrated in FIGS. 10and 11.

In the next step S39, the control portion 50 determines whether or notthe character detection flag F2 is “0” (F2=0). When F2 is 0, the flowproceeds to step S40, and, when F2 is not 0, the routine is finished.

In step S40, the control portion 50 determines whether or not a bindingmethod is horizontal binding. The control portion 50 determines whetheror not the binding method is horizontal binding (horizontally boundoriginal document 14A) based on binding information. In the presentembodiment, the rotation processor 77 of the control portion 50 performsa binding position detection process of detecting a binding position onthe image data GD1 and GD2, and determines whether or not the bindingmethod is horizontal binding based on the binding position detectionresult. The control portion 50 proceeds to step S41 when the bindingmethod is horizontal binding, and proceeds to step S42 when the bindingmethod is not horizontal binding, that is, when the binding method isupper binding (upper bound original document 14B).

In step S41, the control portion 50 performs a horizontal bindingrotation process on the image data GD1 of the front side. Specifically,the control portion 50 executes a horizontal binding rotation processroutine illustrated in the flowchart of FIG. 24. Details of thehorizontal binding rotation process will be described later.

In step S42, the control portion 50 performs an upper binding rotationprocess on the image data GD1 of the front side. Specifically, thecontrol portion 50 executes an upper binding rotation process routineillustrated in the flowchart of FIG. 25. Details of the upper bindingrotation process will be described later.

On the other hand, when the character cannot be detected for the rearside in step S37 and the flow proceeds to step S43, in step S43, thecontrol portion 50 determines whether or not the character detectionflag F2 is “1” (F2=1). When F2 is 1, the flow proceeds to step S44, and,when F2 is not 1, the routine is finished.

In step S44, the control portion 50 determines whether or not a bindingmethod is horizontal binding. The control portion 50 determines whetheror not the binding method is horizontal binding (horizontally boundoriginal document 14A) based on binding information. In the presentembodiment, the rotation processor 77 of the control portion 50 performsa binding position detection process of detecting a binding position onthe image data GD1 and GD2, and determines whether or not the bindingmethod is horizontal binding based on the binding position detectionresult. The control portion 50 proceeds to step S45 when the bindingmethod is horizontal binding, and proceeds to step S42 when the bindingmethod is not horizontal binding, that is, when the binding method isupper binding (upper bound original document 14B).

In step S45, the control portion 50 performs a horizontal bindingrotation process on the image data GD2 of the rear side. Specifically,the control portion 50 executes a horizontal binding rotation processroutine illustrated in the flowchart of FIG. 24. Details of thehorizontal binding rotation process will be described later.

In step S46, the control portion 50 performs an upper binding rotationprocess on the image data GD2 of the rear side. Specifically, thecontrol portion 50 executes an upper binding rotation process routineillustrated in the flowchart of FIG. 25. Details of the upper bindingrotation process will be described later. In the present embodiment, theprocesses in steps S34, S38, S41, S42, S45, and S46 correspond to anexample of a rotation process.

Next, the horizontal binding rotation process routine illustrated inFIG. 24 and the upper binding rotation process routine illustrated inFIG. 25 will be described. The horizontal binding rotation processroutine illustrated in FIG. 24 corresponds to each process in steps S41and S45 in the image processing routine illustrated in FIG. 23. Theupper binding rotation process routine illustrated in FIG. 25corresponds to each process in step S42 and step S46 in the imageprocessing routine illustrated in FIG. 23.

Here, when the horizontally bound original document 14A is scanned,there are four orientations of the original document 14A when theoriginal document 14A is set on the platen 13A of the original documentsupport 13 as illustrated in FIGS. 13 to 16. As illustrated in FIGS. 13to 16, a combination of rotation angles at which the image data GD1 andthe image data GD2 are to be rotated through the rotation process, ofthe image data GD1 of the front side and the image data GD2 of the rearside obtained by reading the original document 14A is uniquelydetermined according to an orientation in which the original document14A is set, that is, an orientation in which the original document 14Ais transported in the transport direction Y1. That is, when a rotationangle of one of the front side and the rear side of the originaldocument 14A is known, a rotation angle of the other side is uniquelydetermined from the “horizontal binding” information of the bindingposition information.

When the upper bound original document 14B is scanned, there are fourorientations of the original document 14B when the original document 14Bis set on the platen 13A of the original document support 13 asillustrated in FIGS. 18 to 21. As illustrated in FIGS. 18 to 21, acombination of rotation angles by which the image data GD1 and the imagedata GD2 are to be rotated through the rotation process, of the imagedata GD1 of the front side and the image data GD2 of the rear sideobtained by reading the original document 14B is uniquely determinedaccording to an orientation in which the original document 14B is set,that is, an orientation in which the original document 14B istransported in the transport direction Y1. That is, when a rotationangle of one of the front side and the rear side of the originaldocument 14B is known, a rotation angle of the other side is uniquelydetermined from the “upper binding” information of the binding positioninformation.

First, the horizontal binding rotation process illustrated in FIG. 24will be described with reference to FIGS. 13 to 16.

First, in step S51, the control portion 50 determines whether or not arotation angle of an image of a side for which a character can bedetected is 90 degrees. When the rotation angle of the image of the sidefor which the character can be detected is 90 degrees, the flow proceedsto step S52, and, when the rotation angle is not 90 degrees, the flowproceeds to step S53.

In step S52, the control portion 50 rotates the image of the side forwhich the character cannot be detected by 270 degrees. Specifically,this rotation process is performed by the rotation processor 77. Asillustrated in FIG. 14, in a case of horizontal binding, when a rotationangle for rotating an image corresponding to the image data GD1 of thefront side for which character detection is successful is 90 degrees, arotation angle for rotating an image corresponding to the image data GD2of the rear side for which character detection fails is 270 degrees.Therefore, the rotation processor 77 rotates the image data GD2 of therear side by 270 degrees in the clockwise direction CW. As illustratedin FIG. 16, in a case of horizontal binding, when a rotation angle forrotating the image corresponding to the image data GD2 of the rear sidefor which character detection is successful is 90 degrees, a rotationangle for rotating the image corresponding to the image data GD1 of thefront side for which character detection fails is 270 degrees.Therefore, the rotation processor 77 rotates the image data GD1 of thefront side by 270 degrees in the clockwise direction CW.

In step S53, it is determined whether or not a rotation angle of animage of a side for which a character can be detected is 180 degrees.When the rotation angle of the image of the side for which the charactercan be detected is 180 degrees, the flow proceeds to step S54, and, whenthe rotation angle is not 180 degrees, the flow proceeds to step S55.

In step S54, the control portion 50 rotates the image of the side forwhich the character cannot be detected by 180 degrees. As illustrated inFIG. 15, in a case of horizontal binding, when a rotation angle forrotating an image corresponding to the image data GD1 of the front sidefor which character detection is successful is 180 degrees, a rotationangle for rotating an image corresponding to the image data GD2 of therear side for which character detection fails is 180 degrees. Therefore,when character detection for the front side fails and characterdetection for the rear side is successful, the rotation processor 77rotates the image data GD1 of the front side by 180 degrees. Whencharacter detection for the front side is successful and characterdetection for the rear side fails, the rotation processor 77 rotates theimage data GD2 of the rear side by 180 degrees.

In step S55, it is determined whether or not a rotation angle of animage of a side for which a character can be detected is 270 degrees.When the rotation angle of the image of the side for which the charactercan be detected is 270 degrees, the flow proceeds to step S56, and, whenthe rotation angle is not 270 degrees, the routine is finished.

In step S56, the control portion 50 rotates the image of the side forwhich the character cannot be detected by 90 degrees. As illustrated inFIG. 14, in a case of horizontal binding, when a rotation angle forrotating the image corresponding to the image data GD2 of the rear sidefor which character detection is successful is 270 degrees, a rotationangle for rotating the image corresponding to the image data GD1 of thefront side for which character detection fails is 90 degrees. Therefore,the rotation processor 77 rotates the image data GD1 of the front sideby 90 degrees in the clockwise direction CW. As illustrated in FIG. 16,in a case of horizontal binding, when a rotation angle for rotating animage corresponding to the image data GD1 of the front side for whichcharacter detection is successful is 270 degrees, a rotation angle forrotating an image corresponding to the image data GD2 of the rear sidefor which character detection fails is 90 degrees. Therefore, therotation processor 77 rotates the image data GD2 of the rear side by 90degrees in the clockwise direction CW.

As illustrated in FIG. 13, in a case of horizontal binding, when arotation angle of an image of a side for which the character can bedetected is 0 degrees, a rotation angle of an image of a side for whichthe character cannot be detected is 0 degrees. Therefore, when the imageof the side for which the character can be detected is not rotated(rotation angle=0 degrees), the control portion 50 does not performspecial processing because the rotation angle for rotating the image ofthe opposite side for which the character cannot be detected is 0degrees.

Next, the upper binding rotation process illustrated in FIG. 25 will bedescribed with reference to FIGS. 18 to 21.

First, in step S61, the control portion 50 determines whether or not arotation angle of an image of a side for which a character can bedetected is 90 degrees. When the rotation angle of the image of the sidefor which the character can be detected is 90 degrees, the flow proceedsto step S62, and when the rotation angle is not 90 degrees, the flowproceeds to step S63.

In step S62, the control portion 50 rotates the image of the side forwhich the character cannot be detected by 90 degrees. Specifically, thisrotation process is performed by the rotation processor 77. Asillustrated in FIG. 21, in a case of upper binding, when a rotationangle for rotating the image corresponding to the image data GD1 of thefront side for which character detection is successful is 90 degrees, arotation angle for rotating an image corresponding to the image data GD2of the rear side for which character detection fails is 90 degrees.Therefore, the rotation processor 77 rotates the image data GD2 of therear side by 90 degrees in the clockwise direction CW. When a rotationangle for rotating the image corresponding to the image data GD2 of therear side for which character detection is successful is 90 degrees, arotation angle for rotating the image corresponding to the image dataGD1 of the front side for which character detection fails is 90 degrees.Therefore, the rotation processor 77 rotates the image data GD1 of thefront side by 90 degrees in the clockwise direction CW.

In step S63, it is determined whether or not a rotation angle of animage of a side for which a character can be detected is 180 degrees.When the rotation angle of the image of the side for which the charactercan be detected is 180 degrees, the routine is finished, and, when therotation angle is not 180 degrees, the flow proceeds to step S64.

In step S64, it is determined whether or not a rotation angle of animage of a side for which a character can be detected is 270 degrees.When the rotation angle of the image of the side for which the charactercan be detected is 270 degrees, the flow proceeds to step S65, and, whenthe rotation angle is not 270 degrees, the flow proceeds to step S66.

In step S65, the control portion 50 rotates the image of the side forwhich the character cannot be detected by 270 degrees. As illustrated inFIG. 19, in a case of upper binding, when a rotation angle for rotatingan image corresponding to the image data GD1 of the front side for whichcharacter detection is successful is 270 degrees, a rotation angle forrotating an image corresponding to the image data GD2 of the rear sidefor which character detection fails is 270 degrees. Therefore, therotation processor 77 rotates the image data GD2 of the rear side by 270degrees in the clockwise direction CW. When a rotation angle forrotating an image corresponding to the image data GD2 of the rear sidefor which character detection is successful is 270 degrees, a rotationangle for rotating an image corresponding to the image data GD1 of thefront side for which character detection fails is 270 degrees.Therefore, the rotation processor 77 rotates the image data GD1 of thefront side by 270 degrees in the clockwise direction CW.

In step S66, the control portion 50 rotates the image of the side forwhich the character cannot be detected by 180 degrees. That is, when therotation angle of the image of the side for which the character can bedetected is not 90 degrees (negative determination in step S61) 180degrees (negative determination in step S63), or 270 degrees (negativedetermination in step S64), the rotation angle is 0 degrees. Asillustrated in FIG. 18, in a case of upper binding, when a rotationangle for rotating the image corresponding to the image data GD1 of thefront side for which character detection is successful is 0 degrees, arotation angle for rotating an image corresponding to the image data GD2of the rear side for which character detection fails is 180 degrees.Therefore, the rotation processor 77 rotates the image data GD2 of therear side by 180 degrees. As illustrated in FIG. 20, in a case of upperbinding, when a rotation angle for rotating the image corresponding tothe image data GD2 of the rear side for which character detection issuccessful is 0 degree, a rotation angle for rotating the imagecorresponding to the image data GD1 of the front side for whichcharacter detection fails is 180 degrees. Therefore, the rotationprocessor 77 rotates the image data GD1 of the front side by 180degrees.

According to the present embodiment, the following effects can beachieved.

1. The image reading apparatus 11 reads an original document andacquires an image. The image reading apparatus 11 includes the firstreading portion 40A that reads the first side P1 of the originaldocument 14 to acquire a first image, the second reading portion 40Bthat reads the second side P2 that is a side opposite to the first sideP1 of the original document 14 to acquire a second image, and thecontrol portion 50 that performs a predetermined detection process onthe first image and a predetermined detection process on the secondimage. When the predetermined detection process is successful for thefirst image, the control portion 50 performs predetermined imageprocessing on the first image based on a value of an image processingvariable specified from the detection result of the predetermineddetection process. When the predetermined detection process issuccessful for the second image, the control portion 50 performspredetermined image processing on the second image based on a value ofan image processing variable specified from the detection result of thepredetermined detection process. When the predetermined detectionprocess on an image of one of the first side P1 and the second side P2fails, the control portion 50 specifies a value of an image processingvariable for the image of one side based on a value of an imageprocessing variable specified from the detection result of thepredetermined detection process on the image of the other side for whichthe predetermined process is successful among the first side P1 and thesecond side P2. The control portion 50 performs predetermined imageprocessing on the image of one side based on the specified value of theimage processing variable.

Therefore, when the predetermined detection process for one of the firstside P1 and the second side P2 fails, the value of the image processingvariable for the image of one side is specified based on the value ofthe image processing variable specified from the detection result of thepredetermined detection process on the image of the other side for whichthe predetermined process is successful among the first side P1 and thesecond side P2, and the predetermined image processing is performed onthe image of one side based on the specified value of the imageprocessing variable. Therefore, even when the predetermined detectionprocess for one side fails, it is possible to acquire images of bothsides subjected to appropriate image processing.

2. The predetermined detection process is a tilt angle detection processof detecting the tilt angles θ1 and θ2 of the original document regionsDA1 and DA2 in the images. The predetermined image processing is a tiltcorrection process of correcting tilts of the original document regionsDA1 and DA2 to be small. When the tilt angle detection process on theimage of one of the first side P1 and the second side P2 fails, thecontrol portion 50 specifies the tilt angle θ1 or θ2 of the originaldocument region DA1 or DA2 in the image of one side based on a tiltangle specified from a detection result of the tilt angle detectionprocess on the image of the other side for which the tilt angledetection process is successful among the first side P1 and the secondside P2. The control portion 50 performs the tilt correction process onthe image of one side based on the specified tilt angle θ1 or θ2.Therefore, even when the tilt detection process on the image of one sidefails, it is possible to acquire the image data GD1 and GD2 of bothsides in which the original document regions DA1 and DA2 are subjectedto appropriate tilt correction.

3. The predetermined detection process is an edge detection process thatis an example of a region detection process of detecting the originaldocument regions DA1 and DA2 in images. The predetermined imageprocessing is a cutout process of cutting out the original documentregions DA1 and DA2 from the images. When the region detection processon an image of one of the first side P1 and the second side P2 fails,the control portion 50 specifies position coordinate values of theoriginal document region DA1 or DA2 in the image of one side as valuesof image processing variables based on position coordinate values of theoriginal document region specified from the detection result of theregion detection process on the image of the other side for which theregion detection process is successful among the first side P1 and thesecond side P2. The control portion 50 performs the cutout process ofcutting out the original document region from the image of one sidebased on the specified position coordinate values of the originaldocument region. Therefore, even when the region detection process onthe image of one side fails, the image data GD1 and GD2 of both sidescut out into the appropriate original document regions DA1 and DA2 canbe acquired.

4. The predetermined detection process includes a character detectionprocess of detecting a character in an image. The predetermined imageprocessing includes a rotation process of rotating the image based on arotation angle specified from an orientation of the detected character.When the character detection process of detecting a character in animage of one of the first side P1 and the second side P2 fails, thecontrol portion 50 specifies a rotation angle specified from anorientation of the character in the image of one side as a value of animage processing variable based on a rotation angle specified from thedetection result of the character detection process of detecting thecharacter in the image of the other side for which the characterdetection process is successful among the first side P1 and the secondside P2. The control portion 50 performs the rotation process ofrotating the image of one side at the rotation angle according to thespecified orientation of the character. Therefore, even when thecharacter detection process for one side of the original document 14fails, it is possible to acquire the image data GD1 and GD2 of bothsides in an appropriate orientation according to the orientation of thecharacter.

5. The control portion 50 acquires binding position informationregarding a binding position of the original document 14. When thecharacter detection process of detecting a character in an image of oneof the first side P1 and the second side P2 fails, the control portion50 specifies a rotation angle determined from an orientation of thecharacter in the image of one side as a value of an image processingvariable based on a rotation angle specified from the detection resultof the character detection process of detecting the character in theimage of the other side for which the character detection process issuccessful among the first side P1 and the second side P2, and thebinding position information. The control portion 50 performs therotation process of rotating the image of one side based on thespecified rotation angle. Therefore, even when the character detectionprocess of detecting the character in the image of one of the first sideP1 and the second side P2 of the original document 14 fails, anorientation of the character in the image of one side can be moreappropriately specified based on the detection result of the characterdetection process of detecting the character in the image of the otherside for which the character detection process is successful, and thebinding position information. Therefore, even when the characterdetection process on the image of one side fails, the image data GD1 andGD2 of both sides can be acquired in a more appropriate orientationaccording to the orientation of the character.

6. As the predetermined detection process, the control portion 50performs a binding position detection process of detecting the bindingmark PT on an image of at least one of the first side P1 and the secondside P2, to acquire binding position information. Therefore, even whenthe character detection process on the image of one side fails, theimage data GD1 and GD2 of both sides can be acquired in a moreappropriate orientation according to an orientation of the characterwhile reducing the time and effort for an operation of inputting thebinding position information.

7. The image reading method includes a reading step of reading the firstside P1 and the second side P2 of the original document, a detectionprocess step, and an image processing step. In the detection processstep, a predetermined detection process is performed on the first imageobtained by reading the first side P1 of the original document 14, and apredetermined detection process is also performed on the second imageobtained by reading the second side P2 opposite to the first side P1 ofthe original document 14. In the image processing step, when thepredetermined detection process for the first image is successful, thepredetermined image processing is performed on the first image based ona value of an image processing variable specified from the detectionresult of the predetermined detection process, and when thepredetermined detection process for the second image is successful, thepredetermined image processing is performed on the second image based ona value of an image processing variable specified from the detectionresult of the predetermined detection process. In the image processingstep, when the predetermined detection process on the image of one ofthe first side P1 and the second side P2 fails, a value of an imageprocessing variable for the image of one side is specified based on avalue of an image processing variable specified from the detectionresult of the predetermined detection process on the image of the otherside for which the predetermined detection process is successful amongthe first side P1 and the second side P2, and the predetermined imageprocessing is performed on the image of one side based on the specifiedvalue of the image processing variable. Therefore, according to theimage reading method, the same effect as that of the image readingapparatus 11 can be achieved.

8. The program PR causes the computer 60 to execute the detectionprocess step and the image processing step. In the detection processstep, a predetermined detection process is performed on the first imageobtained by reading the first side P1 of the original document, and apredetermined detection process is also performed on the second imageobtained by reading the second side P2 opposite to the first side P1 ofthe original document. In the image processing step, when thepredetermined detection process for the first image is successful, thepredetermined image processing is performed on the first image based ona value of an image processing variable specified from the detectionresult of the predetermined detection process, and when thepredetermined detection process for the second image is successful, thepredetermined image processing is performed on the second image based ona value of an image processing variable specified from the detectionresult of the predetermined detection process. In the image processingstep, when the predetermined detection process on the image of one ofthe first side P1 and the second side P2 fails, a value of an imageprocessing variable for the image of one side is specified based on avalue of an image processing variable specified from the detectionresult of the predetermined detection process on the image of the otherside for which the predetermined detection process is successful amongthe first side P1 and the second side P2, and the predetermined imageprocessing is performed on the image of one side based on the specifiedvalue of the image processing variable. Therefore, when the computer 60executes the program PR, the same effect as that of the image readingapparatus 11 can be achieved.

Second Embodiment

Next, a second embodiment will be described with reference to FIG. 26.This second embodiment is different from the first embodiment in that arotation process is performed by a scan driver as an example of areading control device provided in the host apparatus 100. Sinceconfigurations of the remaining constituents are fundamentally the sameas those of the first embodiment, the same reference numerals are givento the same constituents and description thereof will be omitted. InFIG. 26, some configurations of the operation system, the displaysystem, and the transport system of the image reading apparatus 11 areomitted.

As illustrated in FIG. 26, the image reading apparatus 11 includes anedge detection processor 74, a tilt correction processor 75, and acutout processor 76 in an image processing section 73. The hostapparatus 100 includes a scan driver 110 configured with software. Thescan driver 110 includes a rotation processor 77. In the presentembodiment, the scan driver 110 corresponds to an example of a readingcontrol device.

The edge detection processor 74 of the image reading apparatus 11performs an edge detection process. The tilt correction processor 75performs a tilt correction process on the read data SD1 and SD2 based onan edge detection result. The cutout processor 76 performs a cutoutprocess of cutting out the original document regions DA1 and DA2 fromthe read data SD1 and SD2, respectively, to generate image data GD1 andGD2. The control portion 50 of the image reading apparatus 11 executesthe first image processing routine illustrated in the flowchart of FIG.22.

The host apparatus 100 receives the image data GD1 and GD2 obtainedthrough the cutout process from the image reading apparatus 11. The scandriver 110 of the host apparatus 100 performs a rotation process on theimage data GD1 and GD2. The scan driver 110 of the present embodimentincludes a control portion (not illustrated), and the control portionexecutes the second image processing routine illustrated in theflowchart in FIGS. 23 to 25.

The control portion of the scan driver 110 performs a predetermineddetection process including a character detection process on the imagedata GD1 and GD2 received from the image reading apparatus 11. Eventhough the control portion fails in detection for one side as a resultof the predetermined detection process, when the detection is successfulfor the other side, the control portion can specify a rotation angle foran image of one side for which character detection fails based on adetection result (character orientation) of the other side for whichdetection is successful and a rotation angle specified from the bindingposition information. Therefore, the control portion of the scan driver110 can perform a rotation process as predetermined image processing onthe image data GD1 and GD2 of both sides of the original document. Thecontrol portion of the scan driver 110 may acquire the binding positioninformation by inputting the binding position information via theoperation portions 21 and 101, or may perform a binding positiondetection process and acquire the binding position information as adetection result thereof.

Therefore, according to the image reading system 10 in the secondembodiment, the effects of 1. to 7. achieved by the image readingapparatus 11 in the first embodiment can be achieved in the same manner,and the following effects can also be achieved.

9. The image reading system 10 includes the image reading apparatus 11and the scan driver 110 as an example of a reading control device thatis communicably connected to the image reading apparatus 11 in a wiredor wireless manner. The scan driver 110 includes the rotation processor77 as an example of an image processor that performs at least part of atleast predetermined image processing of a predetermined detectionprocess and the predetermined image processing instead of the imagereading apparatus 11. Therefore, since the scan driver 110 configuringthe image reading system 10 shares at least a part of the rotationprocess of the predetermined image processing, a processing load on theimage reading apparatus 11 can be reduced. According to the imagereading system 10, even when a predetermined detection process on animage of one of both sides of an original document fails, it is possibleto acquire images of both sides subjected to appropriate imageprocessing.

Third Embodiment

Next, a third embodiment will be described with reference to FIG. 27.The third embodiment is different from the first embodiment in that anedge detection process, a tilt correction process, a cutout process, anda rotation process are performed by a scan driver 110 as an example of areading control device provided in the host apparatus 100. Sinceconfigurations of the remaining constituents are fundamentally the sameas those of the first embodiment, the same reference numerals are givento the same constituents and description thereof will be omitted. InFIG. 27, some configurations of the operation system, the displaysystem, and the transport system of the image reading apparatus 11 areomitted.

As illustrated in FIG. 27, the image reading apparatus 11 includes animage processing section 73. The image processing section 73 of thepresent embodiment does not perform the edge detection process, the tiltcorrection process, the cutout process, and the rotation process. Thehost apparatus 100 includes a scan driver 110 configured with software.The scan driver 110 includes an edge detection processor 74, a tiltcorrection processor 75, a cutout processor 76, and a rotation processor77.

The host apparatus 100 receives the read data SD1 and SD2 from the imagereading apparatus 11. The scan driver 110 of the host apparatus 100performs the edge detection process, the tilt correction process, thecutout process, and the rotation process. Specifically, in the scandriver 110, the edge detection processor 74 performs the edge detectionprocess on the read data SD1 and SD2 received by the host apparatus 100.The tilt correction processor 75 performs the tilt correction process onthe image data GD1 and GD2 based on the edge detection result. Thecutout processor 76 performs the cutout process of cutting out theoriginal document regions DA1 and DA2 from the read data SD1 and SD2 togenerate the image data GD1 and GD2.

A control portion of the scan driver 110 of the present embodimentexecutes the first image processing routine illustrated in the flowchartin FIG. 22 and the second image processing routine illustrated in theflowchart in FIGS. 23 to 25. Therefore, even though detection for oneside fails as a result of performing a predetermined detection processon the read data SD1 and SD2 of the front side and the rear sideobtained by the reading portions 40A and 40B reading both sides of theoriginal document 14, when the detection is successful for the otherside, a value of an image processing variable for one side can bespecified based on a value of an image processing variable (tiltangle/position coordinate value) specified from the detection result forthe other side for which the detection is successful. Therefore, thecontrol portion of the scan driver 110 can perform predetermined imageprocessing on the read data SD1 or SD2 based on the specified value ofthe image processing variable. Even though character detection for oneside fails as a result of performing a character detection process onthe image data GD1 and GD2 of the original document, when characterdetection is successful for the other side, a rotation angle for animage of one side for which the character detection fails can bespecified based on a rotation angle that is specified based on thecharacter detection result for the other side for which the characterdetection is successful and the binding position information. Thus, thecontrol portion of the scan driver 110 can perform the rotation processas the predetermined image processing on the image data GD1 or GD2 basedon the specified rotation angle.

Therefore, according to the image reading system 10 in the thirdembodiment, the effects of 1. to 7. achieved by the image readingapparatus 11 in the first embodiment can be achieved in the same manner,and the following effects can also be achieved.

10. The image reading system 10 includes the image reading apparatus 11and the scan driver 110 as an example of a reading control device thatis communicably connected to the image reading apparatus 11 in a wiredor wireless manner. The scan driver 110 includes the edge detectionprocessor 74, the tilt correction processor 75, the cutout processor 76,and the rotation processor 77 as an example of an image processor thatperforms a predetermined detection process and predetermined imageprocessing instead of the image reading apparatus 11. Therefore, sincethe scan driver 110 configuring the image reading system 10 performs thepredetermined detection process and the predetermined image processing,a processing load on the image reading apparatus 11 can be significantlyreduced, and it is possible to acquire images of both sides subjected toappropriate image processing even when the predetermined detectionprocess on an image of one side fails.

The above embodiments may also be changed to forms such as modificationexamples described below. An appropriate combination of the aboveembodiments and the modification examples described below may be afurther modification example, or an appropriate combination of themodification examples described below may be a further modificationexample.

-   -   When a character is not detected through the character detection        process, the rotation processor 77 may estimate a binding        position from a character detection result for a side for which        the character is detected without using the binding position        information. For example, when an orientation of a character for        one side for which the character can be detected is an        orientation in which an upper part of the character faces a        short side of an original document region, horizontal binding is        estimated, and a rotation angle for rotating an image of the        other side is specified based on the estimated binding position        information and the orientation of the character. For example,        when an orientation of a character for one side for which the        character can be detected is an orientation in which an upper        part of the character faces a long side of an original document        region, upper binding is estimated, and a rotation angle for        rotating an image of the other side is specified based on the        estimated binding position information and the orientation of        the character.    -   The predetermined detection process may be a tilt angle        detection process of detecting the tilt angle θ. A tilt        correction process may be performed as the predetermined image        processing based on the tilt angle. The predetermined detection        process may be an original document position detection process        of detecting a position of an original document region. A cutout        process may be performed as the predetermined image processing        based on the position of the original document region detected        through the original document position detection process.    -   The predetermined detection process may include one of the edge        detection process, the tilt angle detection process, the region        detection process, the character detection process, and the        binding position detection process. For example, when the        predetermined detection process includes only one process, the        predetermined detection process may be the edge detection        process, may be the tilt angle detection process, may be the        region detection process, may be the character detection        process, and may be the binding position detection process. When        the predetermined detection process includes only two processes,        the predetermined detection process may be the edge detection        process and the character detection process, and may be the        character detection process and the binding position detection        process. The predetermined detection process may include three        processes or may include four processes. The predetermined        detection process may include other detection processes other        than the above four processes. For example, a vertex detection        process of detecting vertices of an original document region may        be used.    -   The predetermined image processing may include one of the tilt        correction process, the cutout process, and the rotation        process. For example, when only one process is included, the        predetermined image processing may be the tilt correction        process, may be the cutout process, and may be the rotation        process. When only two processes are included, the predetermined        image processing may be the tilt correction process and the        cutout process, may be the tilt correction process and the        rotation process, and may be the cutout process and the rotation        process. The predetermined image processing may include other        image processing other than the above three processes.    -   The tilt angle of the image of one of the first side and the        second side that failed in the edge detection process may be        calculated from the tilt angle of the image of the other side        that succeeded in the edge detection process. When a tilt angle        of an image of one side for which the edge detection process        fails is obtained, position coordinate values of an original        document region in the image of one side for which the edge        detection process fails may be calculated based on position        coordinate values of an original document region in an image of        the other side for which the edge detection process is        successful, and the tilt angle may be calculated based on the        position coordinate values of the original document region.    -   In the embodiments, a rotation angle is specified based on a        character orientation specified from the detection result of the        character detection process and the binding position        information, but the rotation angle may be specified based on        the character orientation specified from the detection result of        the character detection process without using the binding        position information. For example, a rotation angle at which a        character orientation is a reading orientation is specified. A        rotation angle may be specified based on binding position        information specified from the detection result of the binding        position detection process without performing the character        detection process. For example, assuming that an original        document is horizontally bound, a rotation angle may be        specified in an orientation in which a detected binding position        is the left on the front side and is the right on the rear side.    -   In the second embodiment and the third embodiment, a CPU (not        illustrated) (hereinafter referred to as the “scan driver 110 or        the like”) executing the scan driver 110 or application software        installed in the host apparatus 100 such as a PC or a smartphone        that receives the image data GD1 and GD2 or the read data SD1        and SD2 from the image reading apparatus 11 may determine a        front side/rear side. The scan driver 110 or the like        determines, for example, an odd-numbered page of the image data        GD1 and GD2 or the read data SD1 and SD2 as the front side and        an even-numbered page as the rear side. When the image reading        apparatus 11 transmits data (file) to the host apparatus 100 in        a predetermined format such as JPEG, characters or a character        string for identifying the front side/rear side may be added to        a file name such as JPEG. Characters, a character string, and        other predetermined information for identifying the front        side/rear side may be added to a header or a user area that is        an area that does not affect an image in a file such as JPEG.        Since defined commands are typically used in a communication        process between the image reading apparatus 11 and the host        apparatus 100, a command for defining the front side and the        rear side may be added. In this case, the command may be        processed as a command indicating that there is a pair of front        and rear sides every two sides, instead of information such as        the front side/rear side. These methods are employed, and thus        the scan driver 110 or the like of the host apparatus 100 that        receives the image data GD1 and GD2 or the read data SD1 and SD2        can identify the front side and the rear side.    -   In the embodiments, the order of the edge detection process for        the front side and the rear side of the original document may be        freely selected.    -   In the embodiments, the order of the tilt correction process for        the front side and the rear side of the original document may be        freely selected.    -   In the embodiments, the order of the cutout process for the        front side and the rear side of the original document may be        freely selected.    -   The operation portion 21 is not limited to a touch panel, and        may be, for example, an operation button.    -   The transport portion 31 and the discharge portion 32 are not        limited to sharing a power source, and the transport portion 31        and the discharge portion 32 may be driven by separate power        sources. For example, a power source of the transport portion 31        is a transport motor, and a power source of the discharge        portion 32 is a discharge motor.    -   The image sensor is not limited to a CMOS image sensor, and may        be, for example, a metal oxide semiconductor (MOS) image sensor        or a charge coupled device (CCD) image sensor.    -   The image sensor 42 is not limited to a linear image sensor, and        may be an area image sensor.    -   Each functional constituent in the computer 60 is not limited to        being realized by a CPU, but may be realized by hardware using        an electronic circuit such as an application specific integrated        circuit (ASIC) and a field-programmable gate array (FPGA), and        may be realized by both software and hardware.    -   The image reading apparatus is not limited to a sheet feed type,        but may be a flatbed type. When the flatbed type image reading        apparatus is employed, a carriage that is movable along a        sub-scanning direction (X direction) is provided in the main        body, and the carriage is moved with a scanning motor as a power        source. An image of an original document set on a glass plate of        a platen is read by a light source and a reading portion        provided on the carriage. The embodiments may also be applied to        the flatbed type image reading apparatus as long as the image        reading apparatus is provided with an automatic sheet feeder        that automatically feeds original documents.    -   The image reading apparatus may be a part of a multi-function        peripheral having a printing function and a copying function in        addition to the scanner function.    -   A material of the original document is not limited to paper, and        may be a film or a sheet made of resin, a woven fabric, a metal        film, or the like.

Hereinafter, the technical concept understood from the above-describedembodiments and modified examples will be described along with theeffects.

A. The image reading apparatus is an image reading apparatus that readsan original document to acquire an image, and includes a first readingportion that reads a first side of the original document to acquire afirst image, a second reading portion that reads a second side that isan opposite side to the first side of the original document to acquire asecond image, and a control portion that performs a predetermineddetection process on the first image and performs the predetermineddetection process on the second image, in which, when the predetermineddetection process is successful for the first image, the control portionperforms, based on a value of an image processing variable specifiedfrom a detection result of the predetermined detection process,predetermined image processing on the first image, when thepredetermined detection process is successful for the second image, thecontrol portion performs, based on a value of an image processingvariable specified from a detection result of the predetermineddetection process, the predetermined image processing on the secondimage, and, when the predetermined detection process on an image of oneside of the first side and the second side fails, the control portionspecifies, based on a value of an image processing variable specifiedfrom a detection result of the predetermined detection process on animage of the other side for which the predetermined detection process issuccessful among the first side and the second side, a value of an imageprocessing variable for the image of the one side, and performs, basedon the specified value of the image processing variable, thepredetermined image processing on the image of the one side.

According to this configuration, when the predetermined detectionprocess of one of the first side and the second side fails, a value ofan image processing variable for an image of one side is specified basedon a value of an image processing variable specified from a detectionresult of the predetermined detection process on an image of the otherside for which the predetermined detection process is successful amongthe first side and the second side, and the predetermined imageprocessing is performed on the image of the one side based on thespecified value of the image processing variable. Therefore, even whenthe detection process on the image of one side of the images obtained byreading both sides of an original document fails, it is possible toacquire the images of both sides of the original document subjected toappropriate image processing.

B. In the image reading apparatus, the predetermined detection processis a tilt angle detection process of detecting a tilt angle of anoriginal document region in the image, the predetermined imageprocessing is a tilt correction process of correcting a tilt of theoriginal document region to be small, and when the tilt angle detectionprocess on an image of one side of the first side and the second sidefails, the control portion may specify, based on a detection result ofthe tilt angle detection process on an image of the other side for whichthe tilt angle detection process is successful among the first side andthe second side, a tilt angle of an original document region in theimage of the one side, and perform, based on the specified tilt angle,the tilt correction process on the image of the one side.

According to this configuration, when the tilt detection process on theimage of one of the first side and the second side fails, a tilt angleof the original document region in the image of one side is specifiedbased on a detection result (tilt angle) of the tilt detection processon the image of the other side for which the tilt detection process issuccessful among the first side and the second side, and the tiltcorrection process is performed on the image of one side based on thespecified tilt angle. Therefore, even when the tilt detection process onthe image of one side fails, it is possible to acquire images of bothsides in which the original document regions are subjected toappropriate tilt correction.

C. In the image reading apparatus, the predetermined detection processis a region detection process of detecting an original document regionin the image, the predetermined image processing is a cutout process ofcutting out the original document region from the image, and when theregion detection process on an image of one of the first side and thesecond side fails, the control portion may specify, based on a detectionresult of the region detection process on an image of the other side forwhich the region detection process is successful among the first sideand the second side, an original document region in the image of the oneside, and perform the cutout process of cutting out the specifiedoriginal document region from the image of the one side.

According to this configuration, when the region detection process ofdetecting the original document region in the image of one of the firstside and the second side fails, the original document region in theimage of one side is specified based on the original document regionthat is the detection result of the region detection process ofdetecting the original document region in the image of the other sidefor which the region detection process is successful among the firstside and the second side, and the cutout process of cutting out thespecified original document region from the image of the one side isperformed. Therefore, even when the region detection process on theimage of one side fails, it is possible to acquire the images of bothsides in which the original document regions are appropriately cut out.

D. In the image reading apparatus, the predetermined detection processincludes a character detection process of detecting a character in theimage, the predetermined image processing includes a rotation process ofrotating the image by a rotation angle based on an orientation of thedetected character, and when the character detection process on an imageof one side of the first side and the second side fails, the controlportion may specify, based on a detection result of the characterdetection process on the image of the other side for which the characterdetection process is successful among the first side and the secondside, an orientation of the character in the image of the one side, andperform the rotation process of rotating the image of the one side by arotation angle corresponding to the specified orientation of thecharacter.

According to this configuration, even when a character in the image ofone of the first side and the second side cannot be detected, anorientation of the character in the image of the one side is specifiedbased on an orientation of the character detected in the image of theother side, and a rotation process of rotating the image of the one sideby a rotation angle corresponding to the specified orientation of thecharacter is performed. Therefore, even when the character detectionprocess for one side of the original document fails, it is possible toacquire images of both sides in an appropriate orientation according tothe orientation of the character.

E. In the image reading apparatus, the control portion acquires bindingposition information regarding a binding position of the originaldocument, and when the character detection process of detecting acharacter in an image of one side of the first side and the second sidefails, the control portion may specify, based on a detection result andthe binding position information, the detection result being of thecharacter detection process of detecting a character in an image of theother side for which the character detection process is successful amongthe first side and the second side, an orientation of the character inthe image of the one side, and perform the rotation process of rotatingthe image of the one side by the rotation angle corresponding to thespecified orientation of the character.

According to this configuration, the control portion acquires thebinding position information of the original document. Even when thecharacter detection process of detecting a character in the image of oneof the first side and the second side of the original document fails, itis possible to more appropriately specify an orientation of thecharacter in the image of the one side based on an orientation of thecharacter in an image of the other side for which the characterdetection process is successful and the binding position information.Therefore, the image of one side can be rotated by a rotation angleaccording to the more appropriately specified orientation of thecharacter. Therefore, even when the character detection process on theimage of one side fails, it is possible to acquire images of both sidesin a more appropriate orientation according to the orientation of thecharacter.

F. In the image reading apparatus, by performing, as the predetermineddetection process, a binding position detection process of detecting abinding mark on an image of at least one of the first side and thesecond side, the control portion may acquire the binding positioninformation.

According to this configuration, the binding position information isacquired by performing the binding position detection process ofdetecting the binding mark on the image of at least one side of bothsides of the original document. For example, there is no need to inputthe binding position information to the image reading apparatus byoperating the operation portion. Therefore, even when the characterdetection process fails for one side of the original document, it ispossible to acquire images of both sides in a more appropriateorientation according to the orientation of the character while reducingthe time and effort for an input operation.

G. The image reading system is an image reading system including theimage reading apparatus and the reading control device that is connectedfor communication to the image reading apparatus in a wired or wirelessmanner, and the reading control device includes an image processingsection that performs, instead of the image reading apparatus, at leastpart of at least the predetermined image processing among thepredetermined detection process and the predetermined image processing.

According to this configuration, since the reading control deviceconfiguring the image reading system shares at least part of imageprocessing of the predetermined image processing, a processing load onthe image reading apparatus can be reduced, and even when thepredetermined detection process on an image fails, images of both sidessubjected to appropriate image processing can be acquired.

H. The image reading method is an image reading method of reading anoriginal document to acquire an image, and includes reading a first sideand a second side of the original document, performing a predetermineddetection process on a first image obtained by reading the first side ofthe original document and performing the predetermined detection processon a second image obtained by reading the second side that is anopposite side to the first side of the original document, and, when thepredetermined detection process is successful for the first image,performing, based on a value of an image processing variable specifiedfrom a detection result of the predetermined detection process,predetermined image processing on the first image, when thepredetermined detection process is successful for the second image,performing, based on a value of an image processing variable specifiedfrom a detection result of the predetermined detection process, thepredetermined image processing on the second image, and, when thepredetermined detection process on an image of one side of the firstside and the second side fails, specifying, based on a value of an imageprocessing variable specified from a detection result of thepredetermined detection process on an image of the other side for whichthe predetermined detection process is successful among the first sideand the second side, a value of an image processing variable for theimage of the one side, and performing, based on the specified value ofthe image processing variable, the predetermined image processing on theimage of the one side.

According to this method, even when the predetermined detection processon the image of one side fails, it is possible to acquire the images ofboth sides subjected to appropriate image processing.

I. A non-transitory computer-readable storage medium stores the programthat is a program executed by a computer that performs a process ofreading an original document to acquire an image, the program causingthe computer to execute performing a predetermined detection process ona first image obtained by reading a first side of the original documentand performing the predetermined detection process on a second imageobtained by reading a second side that is an opposite side to the firstside of the original document, and, when the predetermined detectionprocess is successful for the first image, performing, based on a valueof an image processing variable specified from a detection result of thepredetermined detection process, predetermined image processing on thefirst image, when the predetermined detection process is successful forthe second image, performing, based on a value of an image processingvariable specified from a detection result of the predetermineddetection process, the predetermined image processing on the secondimage, and, when the predetermined detection process on an image of oneside of the first side and the second side fails, specifying, based on avalue of an image processing variable specified from a detection resultof the predetermined detection process on an image of the other side forwhich the predetermined detection process is successful among the firstside and the second side, a value of an image processing variable forthe image of the one side, and performing, based on the specified valueof the image processing variable, the predetermined image processing onthe image of the one side.

The computer executes the program, and, thus, even when thepredetermined detection process on the image of one side fails, it ispossible to acquire the images of both sides subjected to appropriateimage processing.

What is claimed is:
 1. An image reading apparatus that reads an originaldocument to acquire an image, the image reading apparatus comprising: afirst reading portion that reads a first side of the original documentto acquire a first image; a second reading portion that reads a secondside that is an opposite side to the first side of the original documentto acquire a second image; and a control portion that performs apredetermined detection process on the first image and performs thepredetermined detection process on the second image, wherein when thepredetermined detection process is successful for the first image, thecontrol portion performs, based on a value of an image processingvariable specified from a detection result of the predetermineddetection process, predetermined image processing on the first image,when the predetermined detection process is successful for the secondimage, the control portion performs, based on a value of an imageprocessing variable specified from a detection result of thepredetermined detection process, the predetermined image processing onthe second image, and when the predetermined detection process on animage of one side of the first side and the second side fails, thecontrol portion specifies, based on a value of an image processingvariable specified from a detection result of the predetermineddetection process on an image of an other side for which thepredetermined detection process is successful among the first side andthe second side, a value of an image processing variable for the imageof the one side, and performs, based on the value of the imageprocessing variable that is specified, the predetermined imageprocessing on the image of the one side.
 2. The image reading apparatusaccording to claim 1, wherein the predetermined detection process is atilt angle detection process of detecting a tilt angle of an originaldocument region in the image, the predetermined image processing is atilt correction process of correcting a tilt of the original documentregion to be small, and when the tilt angle detection process on animage of one side of the first side and the second side fails, thecontrol portion specifies, based on a detection result of the tilt angledetection process on an image of an other side for which the tilt angledetection process is successful among the first side and the secondside, a tilt angle of an original document region in the image of theone side, and performs, based on the tilt angle that is specified, thetilt correction process on the image of the one side.
 3. The imagereading apparatus according to claim 1, wherein the predetermineddetection process is a region detection process of detecting an originaldocument region in the image, the predetermined image processing is acutout process of cutting out the original document region from theimage, and when the region detection process on an image of one side ofthe first side and the second side fails, the control portion specifies,based on a detection result of the region detection process on an imageof an other side for which the region detection process is successfulamong the first side and the second side, an original document region inthe image of the one side, and performs the cutout process of cuttingout the original document region that is specified from the image of theone side.
 4. The image reading apparatus according to claim 1, whereinthe predetermined detection process includes a character detectionprocess of detecting a character in the image, the predetermined imageprocessing includes a rotation process of rotating the image by arotation angle based on an orientation of the character that isdetected, and when the character detection process on an image of oneside of the first side and the second side fails, the control portionspecifies, based on a detection result of the character detectionprocess on an image of an other side for which the character detectionprocess is successful among the first side and the second side, anorientation of a character in the image of the one side, and performsthe rotation process of rotating the image of the one side by a rotationangle corresponding to the orientation of the character that isspecified.
 5. The image reading apparatus according to claim 4, whereinthe control portion acquires binding position information regarding abinding position of the original document, and when the characterdetection process of detecting a character in an image of one side ofthe first side and the second side fails, the control portion specifies,based on a detection result and the binding position information, thedetection result being of the character detection process of detecting acharacter in an image of an other side for which the character detectionprocess is successful among the first side and the second side, anorientation of the character in the image of the one side, and performsthe rotation process of rotating the image of the one side by therotation angle corresponding to the orientation of the character that isspecified.
 6. The image reading apparatus according to claim 5, whereinby performing, as the predetermined detection process, a bindingposition detection process of detecting a binding mark on an image of atleast one of the first side and the second side, the control portionacquires the binding position information.
 7. An image reading systemcomprising: the image reading apparatus according to claim 1; and areading control device that is connected for communication to the imagereading apparatus in a wired or wireless manner, wherein the readingcontrol device includes an image processing section that performs,instead of the image reading apparatus, at least part of at least thepredetermined image processing among the predetermined detection processand the predetermined image processing.
 8. An image reading method ofreading an original document to acquire an image, the image readingmethod comprising: reading a first side and a second side of theoriginal document; performing a predetermined detection process on afirst image obtained by reading the first side of the original documentand performing the predetermined detection process on a second imageobtained by reading the second side that is an opposite side to thefirst side of the original document; and when the predetermineddetection process is successful for the first image, performing, basedon a value of an image processing variable specified from a detectionresult of the predetermined detection process, predetermined imageprocessing on the first image, when the predetermined detection processis successful for the second image, performing, based on a value of animage processing variable specified from a detection result of thepredetermined detection process, the predetermined image processing onthe second image, and, when the predetermined detection process on animage of one side of the first side and the second side fails,specifying, based on a value of an image processing variable specifiedfrom a detection result of the predetermined detection process on animage of an other side for which the predetermined detection process issuccessful among the first side and the second side, a value of an imageprocessing variable for the image of the one side, and performing, basedon the value of the image processing variable that is specified, thepredetermined image processing on the image of the one side.
 9. Anon-transitory computer-readable storage medium storing a programexecuted by a computer that performs a process of reading an originaldocument to acquire an image, the program causing the computer toexecute: performing a predetermined detection process on a first imageobtained by reading a first side of the original document and performingthe predetermined detection process on a second image obtained byreading a second side that is an opposite side to the first side of theoriginal document; and when the predetermined detection process issuccessful for the first image, performing, based on a value of an imageprocessing variable specified from a detection result of thepredetermined detection process, predetermined image processing on thefirst image, when the predetermined detection process is successful forthe second image, performing, based on a value of an image processingvariable specified from a detection result of the predetermineddetection process, the predetermined image processing on the secondimage, and, when the predetermined detection process on an image of oneside of the first side and the second side fails, specifying, based on avalue of an image processing variable specified from a detection resultof the predetermined detection process on an image of an other side forwhich the predetermined detection process is successful among the firstside and the second side, a value of an image processing variable forthe image of the one side, and performing, based on the value of theimage processing variable that is specified, the predetermined imageprocessing on the image of the one side.